Verify removal and add of new node incarnation in multi-dc, #23585

* MemberRemoved must be published before MemberUp, e.g. when restarted
  in other DC
* remove from failureDetector when receiving gossip with new member,
  not only new joining member

* increase timeout in MultiDcSingletonManagerSpec
This commit is contained in:
Patrik Nordwall 2017-09-04 13:21:34 +02:00
parent 9df5d80268
commit 5fc6d5a04a
8 changed files with 169 additions and 18 deletions

View file

@ -886,10 +886,10 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef) extends Actor with
else winningGossip seen selfUniqueAddress)
assertLatestGossip()
// for all new joining nodes we remove them from the failure detector
// for all new nodes we remove them from the failure detector
latestGossip.members foreach {
node
if (node.status == Joining && !localGossip.members(node)) {
if (!localGossip.members(node)) {
failureDetector.remove(node.address)
crossDcFailureDetector.remove(node.address)
}