[infinispan-dev] rehash and prepared tx

Mircea Markus mircea.markus at jboss.com
Tue Mar 1 12:54:12 EST 2011


Hi,

This behaviour is unspecified:
Tx is prepared on N1 and N2. Then N2 crashes, and prepared tx is migrated across to N3. What happens with the tx if it cannot acquire locks on N3, because there's another tx2 preparing* on N3?

*preparing - it cannot be finished preparing as there's already a *prepared* tx owning some of its locks. We cannot have two prepared tx that have same lock acquired.  

Here is my take on this scenario: if the tx is already prepared on Node1 then same tx should force lock acquisition on Node3 and force rollback of any tx that holds a lock on that node. Why? (1) because Node1's tx is already prepared and it made a commitment to the TxManager to apply state (or manual recovery needs to be done - bad for throughput and user experience. (2) on the other hand the transaction on Node3 is not yet prepared.

Cheers,
Mircea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20110301/dff1817a/attachment.html 


More information about the infinispan-dev mailing list