[infinispan-dev] eager locking and async replication
Manik Surtani
manik at jboss.org
Fri Aug 20 06:04:20 EDT 2010
Not sure I understand - are you proposing that the RPC for LockControlCommands are always async if the keys are generated using the key affinity service?
On 19 Aug 2010, at 16:29, Mircea Markus wrote:
> 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
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
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