[infinispan-dev] Order of locking in optimistic tx cache
Radim Vansa
rvansa at redhat.com
Mon Jan 29 12:42:03 EST 2018
Hi Pedro,
I have a looong open JIRA [1] and so I've tried to look into current
ordering of locks. And I've noticed that we don't sort the keys anymore
but have a short 'big lock' [2] - I don't fully understand it, though.
What happens if T1 has A locked and T2 tries to lock A and B? Is T2
allowed to acquire lock on B and waits for A? Are the locks 'fair' and
the synchronized block introduces an ordering on the lock requests?
Thanks
Radim
[1] https://issues.jboss.org/browse/ISPN-2491
[2]
https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/util/concurrent/locks/impl/DefaultLockManager.java#L115
--
Radim Vansa <rvansa at redhat.com>
JBoss Performance Team
More information about the infinispan-dev
mailing list