dart_postgresql icon indicating copy to clipboard operation
dart_postgresql copied to clipboard

Create test for transaction isolation level being reset to default after conn returned to pool.

Open xxgreg opened this issue 11 years ago • 0 comments

Need to check that transaction isolation is cleared after it is returned to the pool.

From Hikari FAQ:

Q: I am getting strange transaction isolation behavior after changing it, what is happening?

A: Always use the JDBC Connection.setTransactionIsolation() method rather than executing SQL to change the isolation level. HikariCP must reset the isolation level for connections returned to the pool, but only does so if it detects that the isolation level has changed. Using SQL rather than the JDBC API to manipulate the isolation level prevents HikariCP from being able to detect the change, and therefore it will not reset the isolation level. This can cause the isolation level set by one consumer to "bleed" over to another consumer of the pool.

xxgreg avatar Nov 23 '14 20:11 xxgreg