Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the stacktrace created when connection is aquired during leak detection #1272

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ppearcy
Copy link

@ppearcy ppearcy commented Oct 31, 2018

Hi Again!
A small quality of life improvement to allow external users to get to the connection creation stacktrace. This is useful as I have leak detection hooks in my testing framework and when a leaked connection is detected being able to pull the stack trace right from the connection object is very convenient.

Open to any thoughts or getting this rejected, but figured I'd give it a shot.

If you are open to this, will add test case and address any feedback.

…detection. This is useful for external leak detection logging
@codecov
Copy link

codecov bot commented Oct 31, 2018

Codecov Report

Merging #1272 into dev will decrease coverage by 0.1%.
The diff coverage is 40%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1272      +/-   ##
============================================
- Coverage     74.53%   74.43%   -0.11%     
  Complexity      557      557              
============================================
  Files            24       24              
  Lines          1940     1944       +4     
  Branches        265      265              
============================================
+ Hits           1446     1447       +1     
- Misses          349      352       +3     
  Partials        145      145
Impacted Files Coverage Δ Complexity Δ
...n/java/com/zaxxer/hikari/pool/ProxyConnection.java 79.11% <0%> (-0.51%) 49 <0> (ø)
...ain/java/com/zaxxer/hikari/pool/ProxyLeakTask.java 86.2% <50%> (-6.11%) 7 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45912eb...ab71ced. Read the comment docs.

@@ -184,6 +184,17 @@ void cancelLeakTask()
leakTask.cancel();
}

/**
* Returns the stacktrace location of where the connection was acquired. If leak detection is not endabled, will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endabled => enabled

@johnou
Copy link
Contributor

johnou commented Nov 14, 2018

how do the leak detection hooks work? could the existing logging be improved instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants