=clu #18554 Make oldest assignment deterministic when joining

* the reported issue is fixed by the immediate leaderActions
  (moving to Up)  when joining the first node to itself
* the other changes are precautions just in case
This commit is contained in:
Patrik Nordwall 2015-10-21 07:53:12 +02:00
parent 1bacae3cac
commit 9380983d3c
9 changed files with 116 additions and 99 deletions

View file

@ -511,7 +511,10 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef) extends Actor with
updateLatestGossip(newGossip)
logInfo("Node [{}] is JOINING, roles [{}]", node.address, roles.mkString(", "))
if (node != selfUniqueAddress)
if (node == selfUniqueAddress) {
if (localMembers.isEmpty)
leaderActions() // important for deterministic oldest when bootstrapping
} else
sender() ! Welcome(selfUniqueAddress, latestGossip)
publish(latestGossip)