<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>This is a discussion Galder and I started on the irc.</div><div>We son't currently have a well defined policy for what happens when fetchPersistentState="true" and the node that receives state already has some data in it, that might overlap with remotely received data.</div><div>Most of the loaders right now do a clear() now, before integrating any data. This is not done by all the loaders: JdbmCacheStore, BdbjeCacheStore override this.</div><div>So some of the loaders do a mirror of the data(first they empty the store), some do an override. </div><div><br></div><div>Mirror might make sense in <span class="Apple-style-span" style="font-family: 'Lucida Grande'; ">at least one scenario: you have a cluster running, each node having it's own local store. One node goes down and, after a while you re-start it. This new node will integrate the persistent state of the others, and entries might have been deleted in between (while the node was down). now, if these deleted entries are in new joiner's store, this would mean data inconsistency.</span></div><div><font class="Apple-style-span" face="'Lucida Grande'"><br></font></div><div><font class="Apple-style-span" face="'Lucida Grande'">So I think we should:</font></div><div><font class="Apple-style-span" face="'Lucida Grande'">- clearly define what happens with the existing data in the cache store during fetchPersistentState</font></div><div><font class="Apple-style-span" face="'Lucida Grande'">- if we decide to clear it before fetchPersistentState, we should call store.clear() from StateTransferManager and not from particular cache store implementation, as this is error prone</font></div><div><font class="Apple-style-span" face="'Lucida Grande'">- we can even use a configurable strategy, e.g. fetchPersistentState="none" fetchPersistentState="override" fetchPersistentState="mirror"</font></div><div><font class="Apple-style-span" face="'Lucida Grande'"><br></font></div><div><font class="Apple-style-span" face="'Lucida Grande'">Cheers,</font></div><div><font class="Apple-style-span" face="'Lucida Grande'">Mircea</font></div></body></html>