I made some tests using Orient Key/Value Serve that uses Hazelcast to store entries. In effects when a node dies the backup node starts the migration and invoke the store for all the instances owned by the died node.
Hi, the store() is called only against the owner node. The backup nodes mantains entries only in RAM until someone became the owner (in case of crash for example).
Thats exactly what I am trying to achieve. If the primary node dies, I want to have new persistence saved to the next node (new owner). I this how its supposed to work? What I see is that the current behavior assumes there is centralized store, hence AbstractMapStore.init/destroy is per hazelcast instance!
You have experienced the store() on different nodes because the keys was different and hazelcast has distributed among the nodes using its Distributed Hash Table algorithm.
Lets assume, I have 3 hazelcast nodes and each node has persistence enabled. If only the first(only one) node is writing to the map, I was expecting that MapStore.store/storeAll event is sent to all 3 nodes. Infact I see kind of random behavior. store() gets called on node1 (which is calling IMap.put()) but after certain number of entries I see node2's mapStore.store() is getting called and then after sometime node1's store is called.
Is there any configuration that I can use to control which node's mapstore get called? I am trying to make sure that each node's MapStore.store/storeAll get called so that I can create a local (to each node) persistence store, kind of distributed persistence store. Is it possible?