[infinispan-dev] eager locking and async replication

Mircea Markus mircea.markus at jboss.com
Thu Aug 19 11:29:12 EDT 2010


Hi,

Here is the scenario,  N=numOwners

TM.start()
c.lock(a); //this makes N (might me less) RPCs to acquire locks  
c.get(a)
...
TM.commit(); // this would do an N calls for prepare/commit. Might happen async.

By using the key affinity service, one might enforce a tx to operate on "local" keys (i.e. keys that are hashed on the same node where the tx was started). 
Now, if we would be able to *only* eager lock the main data owner (v.s. N RPCs for lock acquisition  locks) than eager locking would be as fast as the non-eager locking for this scenario. 
What happens with the TX if the data owner crashes and only one copy is locked? We would need to invalidate the transaction at originator's side, which I think is possible.
For async repl with N >= 2 and key affinity the performance benefit for eager locking would be close to local puts: which is huge. 

This use case was brought by Erik ( cc)- please add you comments if something is missing. What do you think about this optimisation?

Cheers,
Mircea 


More information about the infinispan-dev mailing list