[infinispan-dev] SingleJoinTest#testTransactional failure

Manik Surtani manik at jboss.org
Tue Nov 30 11:41:54 EST 2010


On 30 Nov 2010, at 12:34, Mircea Markus wrote:

>> 
>> 1)  This is pretty easy to detect.  Attempt to acquire the lock with a smaller lock acquisition timeout and if the transaction is still stuck, abort the transaction and proceed with the join.
>> 2)  If the blocking node is *not* the transaction originator (as in this case: the tx was started on A), then just force lock removal and tx rollback on B *only*.  Let the tx complete on A, since the new joiner will receive the transactional event and will be able to apply it as a new owner.
> What I'm saying It might be very wrong, but trying :)
> Isn't it possible to make the invalidation of K on B part of the transaction commit? I.e. the invalidation on B sees that K is locked by an tx that is not committed and it skips the invalidation. When tx commits (second phase) it multicasts the commit message to all the lock owners _including_ B (all the owners == {A, B, D}). When CommitCOmmand is received,  B checks weather or not it still is an data owner for each key: if it is the it applies it, otherwise it removes it. 


Definitely a good idea.  :)  If you can do it.  Perhaps add a flag to the tx context to remove it from L1 when the tx completes?

Cheers
Manik
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list