[infinispan-dev] Conditional cache operations useless with Optimistic locking?

Mircea Markus mmarkus at redhat.com
Tue Mar 12 07:41:27 EDT 2013


On 6 Mar 2013, at 14:45, Galder Zamarreño wrote:

> Hi,
> 
> Re: https://issues.jboss.org/browse/ISPN-2891
> 
> Not sure what previous Infinispan version the AS instance Immutant guys used (5.1?), but seems like they're having more issues with the clojure test linked in the JIRA.
The CO in 5.1.x were broken in many ways. Moving to 5.2.x should fix this.
> 
> Again, we're talking about issues with replace(), but in a single node environment. They seem to have issues with PL and OL, but let's focus on OL for which there are logs attached.
> 
> Do conditional operations make any sense at all with OL? For example, can the return of replace() be taken a truthful in a transaction with OL?
I think they do. With optimistic transactions the result of a replace is indeed calculated at operation time (vs as lock acquisition time). But if you need to make sure that the old value hasn't changed in between, then enable write skew check and your transaction would fail (well that's actually still something to look at ISPN-2840). 
> 
> As shown in the bad.log, this is not possible because lock acquisition and write skew checks are only done when the transaction is committed. So, what's the point of the conditional operations with OL? Their returns provide no guarantees whatsoever.
> 
> If this is known thing, I'm not aware of any docu on the topic.
> 
> Thoughts?
> 
> Cheers,
> --
> Galder Zamarreño
> galder at redhat.com
> twitter.com/galderz
> 
> Project Lead, Escalante
> http://escalante.io
> 
> Engineer, Infinispan
> http://infinispan.org
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

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







More information about the infinispan-dev mailing list