<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 4 Apr 2009, at 16:16, Mircea Markus wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>Current implementation of tx in JBC/infinispan might result in heuristic transactions: e.g. if the coordinator cannot send an commit message (2nd phase from 2PC) within a given timeout to some of the participants, this might results in data being committed on some nodes and rollbacked on other. </div></blockquote><div><br></div><div>? &nbsp;If the coord (and I assume you mean the transaction coordinator, not the JGroups channel coordinator) doesn't broadcast a commit, none of the other nodes would have committed this state. &nbsp;I don't see how you have a situation where it is committed on some and rolled back on others.</div><div><br></div><div>Perhaps you mean if the tx coordinator has broadcast a commit, some receive the commit and before all receive the commit the tx coordinator dies. &nbsp;And you are not using multicast (if you are they all receive the commit message at the same time). &nbsp;But we recommend you use multicast anyway so I'm not so sure if this is such a problem.</div><br><blockquote type="cite"><div>Even worse, there is no way to take action and recover from the failure. Would it make sense to have tx failure recovery &nbsp;mechanism in &nbsp;infinispan?</div></blockquote><div><br></div><div>Well, it depends. &nbsp;If it is used as a cache for a db, then "recovery" is to just empty the cache. &nbsp;Otherwise, if you want to treat it as a distributed in-memory db, "recovery" here would mean emptying the cache instance in question, and doing a state transfer from a neighbour (REPL) or re-hashing keys (DIST).</div><br><blockquote type="cite"><div> &nbsp;I'm referring &nbsp;here to something similar to the way DBs work, i.e. based on an persistent tx logs, external notifications etc? Even though I didn't see any such request on forums, I guess such a feature is mandatory for certain systems, e.g. a financial application. Wdyt?</div></blockquote><div><br></div><div>Persistent tx logs can be just as error-prone, unless you checkpoint open files to disk via OS system calls to ensure all kernel and hardware caches are flushed. &nbsp;But this is *very* slow. &nbsp;</div><div><br></div><div>AFAIK the way DBs do this - including Oracle - is to checkpoint at intervals, but this still allows for windows where your persistent tx log could be out of date or corrupt.</div></div><div><br></div>Cheers<br><div apple-content-edited="true"> <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-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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-infinispantal-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>Lead, JBoss Cache</div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a><br><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>