On 18 Jun 2013, at 14:16, Dan Berindei <[email protected]> wrote:

> On Mon, Jun 17, 2013 at 7:00 PM, Mircea Markus <[email protected]> wrote:
> 
> On 17 Jun 2013, at 16:11, Dan Berindei <[email protected]> wrote:
> 
> > > I think that, given that the local node is not owner, the lock 
> > > acquisition is redundant even for pessimistic caches.
> > > Mind creating a test to check if dropping that lock acquisition doesn't 
> > > break things?
> >
> > I created a JIRA with low priority since it does not affect the
> > transaction outcome/isolation and I believe the performance impact
> > should be lower (you can increase the priority if you want).
> >
> > https://issues.jboss.org/browse/ISPN-3237
> >
> > If we don't lock the L1 entry, I think something like this could happen:
> 
> There is a lock happening *without* L1 enabled.
> 
> 
> 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.
A lock is being acquired even without L1 enabled on A:  
https://github.com/an1310/infinispan/blob/master/core/src/main/java/org/infinispan/interceptors/distribution/TxDistributionInterceptor.java#L405

> 
> 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.



Cheers,
-- 
Mircea Markus
Infinispan lead (www.infinispan.org)





_______________________________________________
infinispan-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to