Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
TransactionalMap containsKey() blocks when key was previosuly locked by getForUpdate() #7588
I wanted to check for object existence before calling getForUpdate().
however, the problem is that if the key is already locked by previous getForUpdate() then
I think this is erroneous behavior as containsKey() is a read-only operation that should not be blocked.
Please, advise of what is the right way to check for object existence before getForUpdate().
tried on v3.5.5
So you do not need to check for existence of an object.
Regarding the blocking behavior of read-only operations in transactions, it is there by design to accomplish the atomicity of the transactions. We are planning to redesign this in 3.7.