On 8 Mar 2013, at 12:50, Sanne Grinovero wrote:
I think using conditional operations is very useful even with
optimistic locking: the single conditional operation might not make
sense, but a transaction might include more operations and some of
these operations might depend on the result of the conditional
operation.
I'd expect the conditional operation to only return the value based on
current state (a prediction), and the transaction would fail if this
value is no longer valid at commit time. So no locks need to be taken
during the evaluation.
that's only if you have write skew check enabled.
Cheers,
--
Mircea Markus
Infinispan lead (
www.infinispan.org)