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.
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?
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...
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.