[infinispan-dev] on optimistic locking semnatics

Manik Surtani manik at jboss.org
Fri Jun 22 11:00:42 EDT 2012


Isn't this akin to SERIALIZABLE?

On 22 Jun 2012, at 15:47, Mircea Markus wrote:

> Hi guys,
> 
> I've come around a JIRA[1] about optimistic locking and write skew check, and wondering what's the expected behavior in the following scenario:
> tx1.begin()
> read(a); 
> // tx2 modifies 'a' and commits changes
> write(b);
> tx1.commit() - shall I get a write skew (version changed) exception here as a was modified between read and commit?
> 
> In other words, shall I also perform write skew check for the entries that were read during a tx? We currently don't, but I can totally see situations in which this would be needed: if the decision to write to 'b' is made on the value of 'a' and there's an invariant containing both a and b.
> 
> 
> [1]https://issues.jboss.org/browse/ISPN-1841
> 
> Cheers
> Mircea
> --
> Mircea Markus
> twitter.com/mirceamarkus
> 
> Sr. Software Engineer, Infinispan
> http://www.infinispan.org
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani

Project Lead, Infinispan
http://www.infinispan.org

Platform Architect, JBoss Data Grid
http://www.redhat.com/promo/dg6beta

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20120622/e6457873/attachment.html 


More information about the infinispan-dev mailing list