-
1. Re: infinispan5.3 fetchInMemoryState=false,some data loss
dan.berindei Sep 4, 2013 12:23 PM (in response to sixiaozi)Why do you need fetchInMemoryState = false?
Unfortunately, the documentation of that configuration element is not complete/accurate, and it doesn't mention that it could lead to data loss, but it is the expected behaviour. I've created ISPN-3469 to track the documentation update.
-
2. Re: infinispan5.3 fetchInMemoryState=false,some data loss
sixiaozi Sep 4, 2013 9:37 PM (in response to dan.berindei)fetchInMemoryState set false, the data will not move when a node leaves.
I think ,some data should not be lost when fetchInMemoryState set false and numOwners="2", do you think?
-
3. Re: infinispan5.3 fetchInMemoryState=false,some data loss
dan.berindei Sep 19, 2013 10:30 AM (in response to sixiaozi)The data is not really lost, the owner that survived still has the data. But when numOwners = 2, Infinispan will allocate another owner to hold that entry, and both owners are considered equal. If the new owner doesn't fetch the value from the surviving owner, it will consider that the entry is missing. We assume that you set fetchInMemoryState = false because you can easily recreate the entry from another source, so you won't mind some nodes seeing a missing entry.
I guess it would be possible to write a custom ConsistentHashFactory that only allocates new owners for entries that have 0 owners, so that all the nodes would see the same value even with fetchInMemoryState = false. But I don't really see a use case for that...
-
4. Re: infinispan5.3 fetchInMemoryState=false,some data loss
dan.berindei Sep 19, 2013 11:56 AM (in response to dan.berindei)I realized that there may be another way to get what you want: use JMX to connect to the LocalTopologyManager MBean and set the rebalancingEnabled attribute to false. There's no way to do it via configuration, but you only have to do it when you start the first node in the cluster.