From 472d404bbeb1198d82a9a311f27bf216542bd840 Mon Sep 17 00:00:00 2001 From: adebski Date: Fri, 26 Feb 2016 20:35:19 +0100 Subject: [PATCH] =clu #19859 Relaxed constraints on downing old incarnation of rejoining node. * Automatic downing of old node incarnation when new tries to rejoin the cluster is performed even if old incarnation was left in Leaving or Exiting state. * Added information to clustering docs about automatic downing of old incarnations when new tries to rejoin the cluster. --- akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala | 2 +- akka-docs/rst/common/cluster.rst | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala b/akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala index 52327b2ed2..3e2acdfae9 100644 --- a/akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala +++ b/akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala @@ -496,7 +496,7 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef) extends Actor with // new node will retry join logInfo("New incarnation of existing member [{}] is trying to join. " + "Existing will be removed from the cluster and then new member will be allowed to join.", m) - if (m.status != Down && m.status != Leaving && m.status != Exiting) + if (m.status != Down) downing(m.address) case None ⇒ // remove the node from the failure detector diff --git a/akka-docs/rst/common/cluster.rst b/akka-docs/rst/common/cluster.rst index 07808c3677..3bcb97a228 100644 --- a/akka-docs/rst/common/cluster.rst +++ b/akka-docs/rst/common/cluster.rst @@ -265,7 +265,9 @@ become a part of the cluster). To be able to move forward the state of the ``unreachable`` nodes must be changed. It must become ``reachable`` again or marked as ``down``. If the node is to join the cluster again the actor system must be restarted and go through the joining process again. The cluster can, through the -leader, also *auto-down* a node after a configured time of unreachability.. +leader, also *auto-down* a node after a configured time of unreachability. If new +incarnation of unreachable node tries to rejoin the cluster old incarnation will be +marked as ``down`` and new incarnation can rejoin the cluster without manual intervention. .. note:: If you have *auto-down* enabled and the failure detector triggers, you can over time end up with a lot of single node clusters if you don't put