-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
HikariProxyConnection
directly calls delegate.getTransactionIsolation()
, causing a network call every time.
#2198
Comments
The cached transaction isolation only available if HikariCP/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java Lines 419 to 424 in 0a6ccdb
|
quaff
added a commit
to quaff/HikariCP
that referenced
this issue
May 9, 2024
quaff
added a commit
to quaff/HikariCP
that referenced
this issue
May 9, 2024
brettwooldridge
pushed a commit
that referenced
this issue
Sep 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: Hibernate 5.1
What
HikariProxyConnection.getTransactionIsolation()
causes a network call everytime due to invokingdelegate.getTransactionIsolation()
The method for
HikariProxyConnection
says:This causes a call to the underlying
Connection.getTransactionIsolation()
, which is usually a network call to the database.Curiously, in
ProxyConnection
there is a similarly named methodHikariCP/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java
Lines 126 to 129 in 0a6ccdb
Which returns the cached transaction isolation level stored by Hikari.
Why is this a problem
Example: In Spring, there is a check to see if the isolation level of the transaction matches that of the connection.
https://github.com/spring-projects/spring-framework/blob/8137cc95669690f3e4055d6ccf484e98a07b6703/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java#L208-L218
Thank you for your valuable time and attention!
The text was updated successfully, but these errors were encountered: