On Nov 12, 2013, at 3:11 PM, Pedro Ruivo <pedro(a)infinispan.org> wrote:
> 3. Optimistic tx without Write Skew Check (WSC)
> - well, without WSC the transactions are not optimistic by definition
> - they are something else: an batch update of multiple key/values. If the batch is
successful you know the update was atomic. If it failed you don't get any guarantee
> - suggestion: optimistic tx should *always* have WSC enabled (no option to configure
it)
> - build our batching functionality on top of what currently is optimistic tx without
WSC and document it as such
>
-1 to drop it. it has the same semantic as pessimistic transactions (PT)
and it doesn't make sense to remove OT without WS and keep PT without
WS. IMO, or we drop PT and OT without WS or we keep it...
Optimistic transactions in any definition requires version check at the end of the
transaction. Without version check it shouldn't be called optimistic transaction :-)
I'm not really suggesting dropping the functionality, but rebranding it as batching.
Also ISPN's pessimistic transactions are not as pessimistic as they can be: generally
pessimistic transactions acquire a read locks (shared) as well, which blocks other threads
doing writes on that data. Actually the lack of this read-locking is why
Falg.FORCE_WRITE_LOCK is so popular. One day we might enhance pessimistic transactions
with read locks as well (that's the way pessimistic transactions were handled in good
old JBossCache actually).
Cheers,
--
Mircea Markus
Infinispan lead (
www.infinispan.org)