<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">No, JBoss Cache has no way to merge application state since the cache has no knowledge of the context of it's contents and how this should be merged.<div><br class="webkit-block-placeholder"></div><div>There is an open JIRA about this, with some potential solutions (evict all in-memory state when the network heals and assume that the state can be retrieved from a cache loader/shared database, or provide a callback into user code which could handle merging based on knowledge of data in the cache, etc).</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><a href="http://jira.jboss.org/jira/browse/JBCACHE-471">http://jira.jboss.org/jira/browse/JBCACHE-471</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br class="webkit-block-placeholder"></div><div><div>On 7 Nov 2007, at 18:13, Bill Doster wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div>I'm hoping that JBoss Cache can recover cache consistency following a</div><div>transient network outage.&nbsp; From my readings of both Cache and JGroups,</div><div>I've ended up thinking that it's JGroups that notices begin-and-end</div><div>of network partitions and that JGroups then notifies dependent classes</div><div>so that they know that they need to deal with the potential merging of</div><div>any higher-level state changes in each sub-cluster during the network partition.</div><div><br class="khtml-block-placeholder"></div><div>This seems consistent with a recent response from Bela Ban (2007.0914):</div><div><br class="khtml-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><font class="Apple-style-span" face="Helvetica"><a href="http://sourceforge.net/mailarchive/message.php?msg_id=46EA2BA0.9090508%40yahoo.com">http://sourceforge.net/mailarchive/message.php?msg_id=46EA2BA0.9090508%40yahoo.com</a></font></div><div>&nbsp;</div><div>But from my understanding of JBoss Cache (the dependent class I'm considering) via:</div><div><br class="khtml-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"JBoss Cache TreeCache: A Structured, Replicated, Transactional Cache"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(<font class="Apple-style-span" face="Helvetica"><a href="http://labs.jboss.com/file-access/default/members/jbosscache/freezone/docs/1.4.1.SP4/TreeCache/en/html_single/index.html">http://labs.jboss.com/file-access/default/members/jbosscache/freezone/docs/1.4.1.SP4/TreeCache/en/html_single/index.html</a>)</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">I can't identify anything as directly addressing JBoss Cache's "application-data" healing from a network partition...</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Here's a particular test scenario that would need to handle the situation I'm thinking of:</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>JBoss Cache&nbsp;</font><font class="Apple-style-span" face="Helvetica">ClusterName="A-B" with two members ("A" and "B") is started.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>"A" and "B" both view "A" as "coordinator".&nbsp;&nbsp;</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>To keep things simple, let's have only a single region.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>No Cache Loaders are used -- thus all Cache state exists only in-memory (no back-end data store).</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Time passes peacefully and "A-B" builds up some amount of Cache state, all of it consistent across A and B.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Then, a network partition occurs (perhaps a backbone router is powered down for 10-15 minutes to add an additional card).</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>After some amount of time, both A and B finally end-up marking each other "dead" and themselves</font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>as JGroup coordinator for their sub-cluster.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">During this partition, both A and B can continue to accept updates to their Cache state, right?&nbsp;&nbsp;</font></div><div><font class="Apple-style-span" face="Helvetica">And t</font><font class="Apple-style-span" face="Helvetica">his&nbsp;would result in the now-independent Caches becoming distinct from each other.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">So, once the result of the network partition is resolved, JGroups will realize this and notify JBoss Cache</font></div><div><font class="Apple-style-span" face="Helvetica">via a ViewChange.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">My question is:</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;does JBoss Cache itself somehow merge the during-partition state changes together?</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div><div><font class="Apple-style-span" face="Helvetica">Since neither member was itself down and both could potentially have partition-related state changes,</font></div><div><font class="Apple-style-span" face="Helvetica">causing either to simply dump their in-memory state and ask for a full state-transfer will result in a</font></div><div><font class="Apple-style-span" face="Helvetica">loss of information.</font></div><div><font class="Apple-style-span" face="Helvetica"><br class="khtml-block-placeholder"></font></div></div>_______________________________________________<br>jbosscache-users mailing list<br><a href="mailto:jbosscache-users@lists.jboss.org">jbosscache-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/jbosscache-users<br></blockquote></div><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-horizontal-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-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; "><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>Lead, JBoss Cache</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>