-
Bug
-
Resolution: Done
-
Major
-
5.1.0.FINAL
-
None
When a node leaves the cluster gracefully, it is automatically removed from the set of joiners and from the next cache view. If, however, it leaves without sending a CacheViewControlCommand{REQUEST_LEAVE}, it is only handled properly if it's part of the last committed view.
This is visible in the attached log (a simplified version of https://issues.jboss.org/secure/attachment/12350962/org.jboss.as.test.clustering.unmanaged.singleton.SingletonTestCase-output.txt, from ISPN-1806)
The test repeatedly kills a node (node-udp-1) and starts it up again. Somehow JGroups didn't detect the killed node and when it was restarted we received a 3-node view:
20:22:49,552 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-13,null) ISPN000094: Received new cluster view: [node-udp-0/cluster|4] [node-udp-0/cluster, node-udp-1/cluster, node-udp-1/cluster]
CacheViewsManagerImpl tried to install the new view, but obviously the killed node wasn't responding. I believe we only got an exception when the test timed out and it stopped the new node-udp-1:
20:23:20,170 ERROR [org.infinispan.cacheviews.CacheViewsManagerImpl] (CacheViewInstaller-1,node-udp-0/cluster) ISPN000172: Failed to prepare view CacheView{viewId=6, members=[node-udp-0/cluster, node-udp-1/cluster]} for cache default, rolling back to view CacheView{viewId=5, members=[node-udp-0/cluster]}: java.util.concurrent.ExecutionException: org.infinispan.remoting.transport.jgroups.SuspectException: Suspected member: node-udp-1/cluster
However, because of the bug in CacheViewsManagerImpl, we kept trying to install a cache view with 3 nodes:
20:23:20,226 ERROR [org.infinispan.cacheviews.CacheViewsManagerImpl] (CacheViewInstaller-1,node-udp-0/cluster) ISPN000172: Failed to prepare view CacheView{viewId=8, members=[node-udp-0/cluster, node-udp-1/cluster, node-udp-1/cluster]} for cache default, rolling back to view CacheView{viewId=7, members=[node-udp-0/cluster]}: java.util.concurrent.ExecutionException: org.infinispan.remoting.transport.jgroups.SuspectException: One or more nodes have left the cluster while replicating command CacheViewControlCommand{cache=default, type=PREPARE_VIEW, sender=node-udp-0/cluster, newViewId=8, newMembers=[node-udp-0/cluster, node-udp-1/cluster, node-udp-1/cluster], oldViewId=7, oldMembers=[node-udp-0/cluster]}
The test couldn't really stop because it was blocked waiting for a transaction commit, and the commit command was waiting for the cache view installation to end.