On 8 Jul 2011, at 10:34, Galder Zamarreño wrote: > Mircea, thx for writing this up. Some comments: > > It's not clear to me, at least given the examples in the wiki, how problem of > Tx1 and Tx2 with a and b explained in the introduction is fixed by the > solution. > > The problem exposed: > "- with some right timing, during prepare time it is possible for these two > transactions to deadlock: > • Tx1 lock acquired on "a" @ N3 > • Tx2 lock acquired on "b" @ N4 > • Tx1 cannot progress acquiring lock on "b" @ N4, that lock is > acquired by Tx2 > • Tx2 cannot acquire lock on "a" @ N3 as that lock is held by Tx1 > • Tx1 and Tx2 are waiting for each other => deadlock" > > The 'alleged'' solution? > > "In the example above, considering the view = {N1, N2, N3, N4} and > incremental lock acquisition: > • Tx1 acquires lock on a@ N3 > • Tx2 tries to acquire lock on a@ N3. It cannot acquire and waits for > Tx1 to release it > • Tx1 acquires locks on b@ N4, completes and releases locks > • Tx2 acquires lock on a@ N3 and completes as well" > > Is the latter block supposed to show how the example in the introduction is > fixed? If it is, it's not really doing it cos it's not explaining what > happens to Tx2 that is trying to acquire locks on 'b'... Tx2 acquires lock on b @ N4 after locking a@N3, I've updated the document. > > The diagrams and the associated explanations are confusing too. Example: > > "N1 first locks a@N3 (1)" -> in the diagram, (1) represents a call from N1 to > N2 > > "b@N4 (RPC 2)" -> That corresponds to to 5/6 arrows? I've also updated this, thanks! > > On Jul 5, 2011, at 3:25 PM, Mircea Markus wrote: > >> Hi, >> >> This is the document describing the incremental optimistic locking Dan and >> myself discussed last week: >> http://community.jboss.org/wiki/IncrementalOptimisticLocking >> Unless I'm missing something, this together with lock reordering[1] cover >> 100% of the possible deadlock situations in the optimistic locking scheme[2] >> - which is pretty awesome! >> >> Cheers, >> Mircea >> >> [1] http://community.jboss.org/wiki/LockReorderingForAvoidingDeadlocks >> [2] http://community.jboss.org/wiki/OptimisticLockingInInfinispan >> >> _______________________________________________ >> infinispan-dev mailing list >> infinispan-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > -- > Galder Zamarreño > Sr. Software Engineer > Infinispan, JBoss Cache > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev