maniksurtani/infinispan — comment on commit 682eedd9bb6c69aeacd159899cefb0d617661cdd
File: core/src/main/java/org/infinispan/transaction/AbstractCacheTransaction.java line 126
By Sanne:

Unfortunately I think that with this pattern you would have to invoke _hasLockOrIsLockBackup(key)_ again while holding the synchronization.

Otherwise the condition might have been resolved before you enter the lock, and will wait for only the next lock acquisition .. potentially a long time.

Can you proof otherwise? I might be missing the bigger picture.