Overview
Currently, the previousIsolationLevel
is never set in R2dbcTransactionManager.ConnectionFactoryTransactionObject
; however, there is code in place to read the previous isolation level in R2dbcTransactionManager.doCleanupAfterCompletion(TransactionSynchronizationManager, Object)
.
Deliverables
- [x] Determine why
previousIsolationLevel
is never set. - [x] Introduce code to set the
previousIsolationLevel
if appropriate; otherwise, delete all code related topreviousIsolationLevel
.
Comment From: sbrannen
@mp911de, can you please take a look at this?
Comment From: mp911de
previousIsolationLevel
should have been removed with the R2DBC 0.9 upgrade, it's an oversight.
Before R2DBC 0.9, we set and reset the Isolation Level on the connection (same as with JDBC). With R2DBC 0.9, if we set the Isolation Level, then the isolation level is only valid for the duration of a transaction and we expect the driver to reset the Isolation Level after the transaction. This is part of the begin(TransactionDefinition)
contract.
Comment From: sbrannen
Thanks for the feedback and explanation, @mp911de.
I'll remove the obsolete code.