<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is actually worse than I thought, since as prepare has already been issued and remote locks already acquired. With this code in place, you're guaranteed to have stale locks in the system, and the likelihood is very high if you have any ongoing transactions when a node joins or leaves. Stale locks then cascades to causing other subsequent transactions to fail with timeouts.<div><br></div><div>We need to handle this (i.e., not throw this exception!)<br><div><div><br><div><div>On 31 Jan 2011, at 21:40, Mircea Markus wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 31 Jan 2011, at 21:24, Manik Surtani wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Guys,<div><br></div><div>I see this in the code base:</div><div><br></div><div><a href="https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java#L247">https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java#L247</a></div><div><br></div><div>which has come in as a part of this commit:</div><div><br></div><div><a href="https://github.com/infinispan/infinispan/commit/e85204dc34e058c256846699acc21f4dd6f08c4d">https://github.com/infinispan/infinispan/commit/e85204dc34e058c256846699acc21f4dd6f08c4d</a></div><div><br></div><div>This is no good, since throwing an IllegalStateException *after* a transaction has prepared and is attempting to commit will leave the transaction in an inconsistent state. This is why I see heuristic exceptions when trying to stress a lot of transactions while having nodes join/leave.</div><div><br></div><div>A few points:</div><div><br></div><div>1) Mircea, are you aware of this, and is this a part of the transaction refactoring you are working on?</div><div>2) If not, it probably should be. ;)</div></div></blockquote>TransactionXAResource would raise an heuristic exception in this case, so it will be the admin that would need to take care of the commit. </div><div>This code will be revisited as part of the tx refactoring<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>3) Vladimir, why is this check necessary in the first place? If prepares have happened on nodes A and B, and the commit should now go to nodes B and C due to a rehash, can't we send the commit to a union of A, B and C, and let the nodes that don't care about the tx anymore just ignore the commit?</div><div><br></div><div>Cheers</div><div>Manik</div><div><div>
<div><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div>Lead, Infinispan</div><div><a href="http://www.infinispan.org/">http://www.infinispan.org</a></div><div><br></div></div><br class="Apple-interchange-newline">
</div>
<br></div></div>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></blockquote></div><br></div>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div>Lead, Infinispan</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline">
</div>
<br></div></div></div></body></html>