Fix regression in Cluster Singleton, #21236
* When the test fails the node is removed from the membership twice, which triggers two OldestChanged cycles, but in the 2.4.9 change https://github.com/akka/akka/pull/21152/files#diff-f0ae95c926a050aecf45dba3e08d1c77L669 the singleton manager always goes to End (stop) when it has been Oldest * This fix restores the previous behavior for this scenario
This commit is contained in:
parent
0ed4a2aae9
commit
e6068a0f5a
1 changed files with 6 additions and 1 deletions
|
|
@ -608,6 +608,9 @@ class ClusterSingletonManager(
|
|||
// already oldest
|
||||
stay
|
||||
case Some(a) if !selfExited && removed.contains(a) ⇒
|
||||
// The member removal was not completed and the old removed node is considered
|
||||
// oldest again. Safest is to terminate the singleton instance and goto Younger.
|
||||
// This node will become oldest again when the other is removed again.
|
||||
gotoHandingOver(singleton, singletonTerminated, None)
|
||||
case Some(a) ⇒
|
||||
// send TakeOver request in case the new oldest doesn't know previous oldest
|
||||
|
|
@ -683,7 +686,9 @@ class ClusterSingletonManager(
|
|||
if (removed.contains(cluster.selfUniqueAddress)) {
|
||||
logInfo("Self removed, stopping ClusterSingletonManager")
|
||||
stop()
|
||||
} else
|
||||
} else if (handOverTo.isEmpty)
|
||||
goto(Younger) using YoungerData(None)
|
||||
else
|
||||
goto(End) using EndData
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue