<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 17, 2013 at 7:00 PM, Mircea Markus <span dir="ltr"><<a href="mailto:mmarkus@redhat.com" target="_blank">mmarkus@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 17 Jun 2013, at 16:11, Dan Berindei <<a href="mailto:dan.berindei@gmail.com">dan.berindei@gmail.com</a>> wrote:<br>
<br>
> > I think that, given that the local node is not owner, the lock acquisition is redundant even for pessimistic caches.<br>
> > Mind creating a test to check if dropping that lock acquisition doesn't break things?<br>
><br>
> I created a JIRA with low priority since it does not affect the<br>
> transaction outcome/isolation and I believe the performance impact<br>
> should be lower (you can increase the priority if you want).<br>
><br>
> <a href="https://issues.jboss.org/browse/ISPN-3237" target="_blank">https://issues.jboss.org/browse/ISPN-3237</a><br>
><br>
> If we don't lock the L1 entry, I think something like this could happen:<br>
<br>
</div>There is a lock happening *without* L1 enabled.<br>
<div class="im HOEnZb"><br></div></blockquote><div><br></div><div>Nope, tx1 doesn't lock k1 on B because it doesn't do a put(k1, v3) - it only reads the value from B. So even if tx2 does lock k1 on B, it doesn't add any synchronization between tx1 and tx2.<br>
<br></div><div>But tx1 does write the entry to L1 on A, so it should acquire an "L1 lock" on A - and tx2 should also acquire the same lock.<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im HOEnZb">
><br>
> tx1@A: remote get(k1) from B - stores k1=v1 in invocation context<br>
> tx2@A: write(k1, v2)<br>
> tx2@A: commit - writes k1=v2 in L1<br>
> tx1@A: commit - overwrites k1=v1 in L1<br>
><br>
><br>
<br>
</div><div class="im HOEnZb">Cheers,<br>
--<br>
Mircea Markus<br>
Infinispan lead (<a href="http://www.infinispan.org" target="_blank">www.infinispan.org</a>)<br>
<br>
<br>
<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>