Details
-
Bug
-
Resolution: Done
-
Major
-
5.2.0.CR1
-
None
Description
AbstractCacheTransaction.hasLockOrIsLockBackup can be called from non-synchronized context (particularly from the AbstractTxLockingInterceptor when iterating through all transactions from older topology). If the transaction is committed in parallel, AbstractCacheTransaction.clearLockedKeys is called which nulls the volatile field lockedKeys.
lockedKeys != null && lockedKeys.contains(key)
Contains a race condition - lockedKey may be nulled between the checks.
Similar with backupKeyLocks but these are never nulled.