Fix error: READPAST lock in READ COMMITED
Fix the issue "You can only specify the READPAST lock in the READ COMMITED or REPEATABLE READ isolation levels."
The transfer-service uses multiple isolation levels in multiple connections to the Db. When a DB connection uses transactionScope, it changes the isolation level and the connection is kept with that setting in the connection pool. There is one scenario where the isolation level is set to use the default (Serializable), and the error is thrown if the following SQL command contains a READPAST hint.
-
Make sure that when a connection is returned to the pool (when a transactionScope is used) the previous isolation level is reset.
Edited by Pedro Carranza