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

Added Support For beginRequest and endRequest #2079

Closed

Conversation

Deeptanshu-Chowdhuri
Copy link

#2071 Added support of beginRequest and endRequest from JDBC 4.3 onwards.

  • beginRequest hints to the driver that a request, an independent unit of work, is beginning on this connection.
  • endRequest hints to the driver that a request has completed.

Both these calls function to let the driver know when a connection is checked out of the pool and back into the pool.These boundaries can help driver for load balancing and other stuff. These functions are driver specific and may not do anything.

Copy link

@saurabhkverma saurabhkverma left a comment

Choose a reason for hiding this comment

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

Please take a look at the comments.

@Deeptanshu-Chowdhuri
Copy link
Author

@brettwooldridge Please take a look

1 similar comment
@Deeptanshu-Chowdhuri
Copy link
Author

@brettwooldridge Please take a look

Copy link

@akashchouhan16 akashchouhan16 left a comment

Choose a reason for hiding this comment

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

The changes look good! Just the comments could be removed to be consistent with the codebase.

src/main/java/com/zaxxer/hikari/pool/PoolEntry.java Outdated Show resolved Hide resolved
src/main/java/com/zaxxer/hikari/pool/PoolEntry.java Outdated Show resolved Hide resolved
@jeandelavarene
Copy link

Can this PR please be merged?

Comment on lines +83 to +86
DatabaseMetaData dm = connection.getMetaData();
if (dm!=null){
if (dm.getJDBCMajorVersion() > 4 ||
(dm.getJDBCMajorVersion() == 4 && dm.getJDBCMinorVersion() >= 3)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This logic should not be executed every time. Can this be moved somewhere so the calculation of if the feature is supported is only run once. Calling getMetaData might not be cheap.

Choose a reason for hiding this comment

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

This comment has been addressed in pull request #2126

Choose a reason for hiding this comment

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

@lfbayer FYI I've asked Deeptanshu to close this PR as his internship at Oracle is now over. We will continue his work in PR 2126.

@lfbayer
Copy link
Collaborator

lfbayer commented Nov 4, 2023

Closing this as the work is being continued on #2126

@lfbayer lfbayer closed this Nov 4, 2023
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.

6 participants