[infinispan-dev] Write skew check implementation
Galder Zamarreño
galder at redhat.com
Tue Jun 14 07:11:23 EDT 2011
Hi Pedro,
I assume that by partial replication mode you meant distributed mode (using consistent hash algorithm)?
Hmm, why should n2 send the value of d before writing? n1 is an owner of d, so n1 should have that value.
I'm not sure I'm understanding your question correctly.
Cheers,
On Jun 13, 2011, at 7:05 PM, Pedro Ruivo wrote:
> Hi,
>
> I am progressing with my implementation of total-order-based commit
> protocol for the partial replication mode, and I would be grateful if
> you could help me understanding how the write skew check is implemented
> in ISPN.
>
> Assume the scenario in which a node, say n1, that owns a data item d
> receives a prepare message for a transaction, say T, originated on
> different replica n2.
>
> Of course write skew check is enabled.
>
> After n1 acquiring the lock on d, it should check whether the value of d
> read during T's execution is still the most recently committed one.
>
> I may be missing something here, but looking at [1] (lines 160 to 168)
> and [2] at copyForUpdate method, n1 is reading twice the value of d that
> is locally stored (once in line 160([1]) to create the
> RepeatableReadEntry and a second time in line 52([2]) to do the write
> skew check).
>
> I would have expected that the node that originated the transaction
> would send the values that it read (before writing them) in piggyback
> with the prepare message, in order to allow the "owners" to perform the
> write skew.
>
> Thanks
>
> Pedro
>
> [1]
> https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/container/EntryFactoryImpl.java
>
> [2]
> https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/container/entries/RepeatableReadEntry.java
>
> --
> INESC-ID Lisboa, sala 511
> gsd.inesc-id.pt/~pruivo
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the infinispan-dev
mailing list