I'm not sure if this will answer your question, but looking at the source code for the ClusterSingletonManager , you can see the chain of events that leads to this scenario. This class uses the logic of the final state of the machine in Akka, and the behavior that you see is triggered due to a state transition from Start -> BecomingLeader . First view the Start state:
when(Start) { case Event(StartLeaderChangedBuffer, _) ⇒ leaderChangedBuffer = context.actorOf(Props[LeaderChangedBuffer].withDispatcher(context.props.dispatcher)) getNextLeaderChanged() stay case Event(InitialLeaderState(leaderOption, memberCount), _) ⇒ leaderChangedReceived = true if (leaderOption == selfAddressOption && memberCount == 1) // alone, leader immediately gotoLeader(None) else if (leaderOption == selfAddressOption) goto(BecomingLeader) using BecomingLeaderData(None) else goto(NonLeader) using NonLeaderData(leaderOption) }
The part you are looking at:
else if (leaderOption == selfAddressOption) goto(BecomingLeader) using BecomingLeaderData(None)
It seems to me that this fragment says: "If I am a leader, change the beginning to become a leader with None, as an option of the previous Leader"
Then, if you look at the state of the BecomingLeader :
when(BecomingLeader) { ... case Event(HandOverRetry(count), BecomingLeaderData(previousLeaderOption)) ⇒ if (count <= maxHandOverRetries) { logInfo("Retry [{}], sending HandOverToMe to [{}]", count, previousLeaderOption) previousLeaderOption foreach { peer(_) ! HandOverToMe } setTimer(HandOverRetryTimer, HandOverRetry(count + 1), retryInterval, repeat = false) } else if (previousLeaderOption forall removed.contains) {
This is the block that continues to repeat this message that you see in the log. Basically, it is like trying to get the previous leader to transfer responsibility, not knowing who the previous leader was, because in the transition state he went to None as the previous leader. Million-dollar question: "If he does not know who the previous leader is, why continue trying to transfer services that will never succeed?"