You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which returns the cached transaction isolation level stored by Hikari.
The cached transaction isolation only available if Connection::setTransactionIsolation called, I think it could be improved here, but the network call cannot be avoided if Connection::setTransactionIsolation not called first.
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: