[infinispan-dev] SingleJoinTest#testTransactional failure
Vladimir Blagojevic
vblagoje at redhat.com
Mon Nov 29 09:57:54 EST 2010
On 10-11-27 12:29 AM, Manik Surtani wrote:
> Nope, no such mechanism. This needs to be written.
What if we add a new lockAndRecord method in LockManager with signature:
LockingResult lockAndRecord(Object key, InvocationContext ctx, boolean
force) throws InterruptedException;
and LockingResult is enum or a simple class with fields:
boolean acquired;
Object owner;
In case of force, I believe we can atomically change ownership of a
lock, assign owner to previous owner of a lock and thus provide callers
of lockAndRecord with a mechanism to issue a rollback on a correct
global tx in case global tx was previous owner. In normal cases, just as
it is now, we assign value of acquired and in case !acquired owner is
current lock owner.
Questions:
1) If an owner was a thread, not a global tx, what are the consequences
for that thread - is it subsequently going to be prevented from writing
to value key by the locked key?
More information about the infinispan-dev
mailing list