<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yeah I think it is useful to share knowledge like this.<div><br><div><div>On 3 Dec 2010, at 16:39, Vladimir Blagojevic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div text="#000000" bgcolor="#ffffff">
    Excellent!! We should provide short summaries of all non-trivial
    fixes just as you did here!&nbsp; <br>
    <br>
    On 10-12-03 11:58 AM, Manik Surtani wrote:
    <blockquote cite="mid:A611D9D8-F8E2-41CF-9B85-34137981A76C@jboss.org" type="cite">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 moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/51257cb">https://github.com/infinispan/infinispan/commit/51257cb</a></div>
      <div>[2]&nbsp;<a moz-do-not-send="true" href="http://community.jboss.org/thread/158844?tstart=0">http://community.jboss.org/thread/158844?tstart=0</a></div>
      <div>[3]&nbsp;<a moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26</a></div>
      <div>[4]&nbsp;<a moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/51257cb#L1R148">https://github.com/infinispan/infinispan/commit/51257cb#L1R148</a></div>
      <div>[5]&nbsp;<a moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R34">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R34</a></div>
      <div>[6]&nbsp;<a moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L4R56">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L4R56</a></div>
      <div>[7]&nbsp;<a moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L1R83">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L1R83</a></div>
      <div>[9]&nbsp;<a moz-do-not-send="true" href="https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R74">https://github.com/infinispan/infinispan/commit/ca0b28f314bb0a59edc0dfa7453f66fcd9162b26#L8R74</a></div>
      <div>[10]&nbsp;<a moz-do-not-send="true" 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; font-size: 12px;">
            <div>--</div>
            <div>Manik Surtani</div>
            <div><a moz-do-not-send="true" href="mailto:manik@jboss.org">manik@jboss.org</a></div>
            <div>Lead, Infinispan</div>
            <div>Lead, JBoss Cache</div>
            <div><a moz-do-not-send="true" href="http://www.infinispan.org/">http://www.infinispan.org</a></div>
            <div><a moz-do-not-send="true" 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>
      <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
infinispan-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>