[infinispan-dev] fetchPersistentState and local cache store has some data

Mircea Markus mircea.markus at jboss.com
Thu Mar 4 05:12:59 EST 2010


Hi,

This is a discussion  Galder and I started on the irc.
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.
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.
So some of the loaders do a mirror of the data(first they empty the store), some do an override. 

Mirror might make sense in 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.

So I think we should:
- clearly define what happens with the existing data in the cache store during fetchPersistentState
- 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
- we can even use a configurable strategy, e.g. fetchPersistentState="none" fetchPersistentState="override"  fetchPersistentState="mirror"

Cheers,
Mircea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20100304/c99f9a7e/attachment.html 


More information about the infinispan-dev mailing list