<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Mircea's initial fix [1] for ISPN-777 was on the right track but incomplete,&nbsp;as witnessed by comments here [2]:<div><br></div><div>I've made a few more changes [3] to this which will now be in 4.2.0.CR3. &nbsp;Anyway, the purpose of this email is to summarise my changes:</div><div><br></div><div>* Transactions self-destructing was only present on LockingInterceptor.visitLockControlCommand() [4]. &nbsp;This should also be on visiting prepare commands since this is the other place that locks can be acquired and a remote node disappearing.</div><div>* The check above is still not enough. &nbsp;There is a race between conducting the check on a transaction and actually acquiring a lock. &nbsp;E.g., a remote transaction may seem valid in [4]&nbsp;but by the time the thread acquires the lock, the node could have died rendering its transaction stale. &nbsp;For this purpose, I have added a validity field to RemoteTransaction [5] which is flagged whenever a RollbackCommand is invoked [6] [7]. &nbsp;This allows the stale transaction cleanup task to flag such transactions as invalid even if they are being processed on the fly. &nbsp;Finally, I have a check for this flag whenever locks are acquired and entries written to [8] and appropriate lock release if this is the case [9].</div><div>* I've also added a stress test that demonstrates this problem better (much more repeatable), based on the original test submitted by the reporter.</div><div>* Some other minor tweaks like better logging and toString() impls. &nbsp;:-)</div><div><br></div><div>Cheers</div><div>Manik</div><div><br></div><div>[1]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/51257cb">https://github.com/infinispan/infinispan/commit/51257cb</a></div><div>[2]&nbsp;<a href="http://community.jboss.org/thread/158844?tstart=0">http://community.jboss.org/thread/158844?tstart=0</a></div><div>[3]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26</a></div><div>[4]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/51257cb#L1R148">https://github.com/infinispan/infinispan/commit/51257cb#L1R148</a></div><div>[5]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R34">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R34</a></div><div>[6]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L4R56">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L4R56</a></div><div>[7]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L1R83">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L1R83</a></div><div>[9]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R74">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R74</a></div><div>[10]&nbsp;<a href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#diff-11">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#diff-11</a></div><div><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div>Lead, Infinispan</div><div>Lead, JBoss Cache</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></div><div><br></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></body></html>