-
1. Re: Local file persistence of partitioned data with full preload
mircea.markus Mar 2, 2010 6:39 AM (in response to teroheinonen)Q1: yes
Q2: yes
Q3: If tou have fetchPersistentSate="true" then the cache store of A will be cleaned and all the data will be fetched from B and C.
Q4: true
Q5: that's what I would expect, perhs manik can confirm
Re:Q6, you should use preload="true", fetchPesistentState="true" and an @ViewChanged lister. The listener will be called whenever a new member joins, with information(event) that contain the size of the cluster. Once the cluster has the desired state, it means that the whole cluster was started and you can inform your application about it.
HTH,
Mircea
-
2. Re: Local file persistence of partitioned data with full preload
teroheinonen Mar 2, 2010 8:38 AM (in response to mircea.markus)Hi, a couple of more clarification questions. When is @ViewChanged actually called, in case of a new node?
A) after JGroups view has changed, or
B) after the new node is preloaded and state transferred?
Can I rely that on @ViewChanged, all state transfers resulting from the rehashing have been performed?
How are the overlapping rehashing/state transfers managed. E.g. one node JVM crashes -> rehashing/state transfers, the crashed node comes back to alive (e.g. through automatic restart) before the rehashing/state transfer is completed. What is the policy to manage this situation?
Thanks for your support.
-
3. Re: Local file persistence of partitioned data with full preload
mircea.markus Mar 3, 2010 3:27 AM (in response to teroheinonen)Hi, a couple of more clarification questions. When is @ViewChanged
actually called, in case of a new node?A) after JGroups view has
changed, oB) after the new node is preloaded and state
transferred?Good point. ViewChanged will signal jgroups join (A) and not "Node joined and cluster size is now n". I think this might be a bit more complex than I thought. I think a NodeJoined event would make perfect sense for this scenario. But as we don't have one, here is a workaround that I think will do the job: register an CacheStarted listener, that will be called once the local cache is fully started. N.B. this does not mean that cluster is formed, it might be that other caches are still joininig. Now, as the cache is started you can do cache.put(localAddress, "started"). Then, in a loop, do:
while (cacheManager.getMembers().size() < expectedClusterSize) { Thread.sleep(1000); } boolean clusterFormed = false; for (Address addr:cacheManager.getMembers()) { if (cache.get(addr) == null) { clusterFormed = false; } } } //now inform you app that cluster was formed
Looking back, this looks a lot as a workaround, but it should do the job.
How are the overlapping
rehashing/state transfers managed. E.g. one node JVM crashes ->
rehashing/state transfers, the crashed node comes back to alive (e.g.
through automatic restart) before the rehashing/state transfer is
completed. What is the policy to manage this situation?This is something that needs to be looked into in more details. I'll add a JIRA for it;
-
4. Re: Local file persistence of partitioned data with full preload
mircea.markus Mar 3, 2010 3:28 AM (in response to mircea.markus)For more details on how infinispan handles state transfer in an non blocking manner, here is our design document. -
5. Re: Local file persistence of partitioned data with full preload
mircea.markus Mar 3, 2010 3:47 AM (in response to mircea.markus)for the firts issue I've created SPN-360. Feel free to review and comment on it, any feedback much appreciated. -
6. Re: Local file persistence of partitioned data with full preload
mircea.markus Mar 3, 2010 3:52 AM (in response to mircea.markus)Here is the JIRA for investigating and documenting multiple nodes state transfers.