Keep the cluster node membership change listeners when joining.
This commit is contained in:
parent
6ad96c2579
commit
675dfd9182
1 changed files with 2 additions and 1 deletions
|
|
@ -738,7 +738,8 @@ class Cluster(system: ExtendedActorSystem, val failureDetector: FailureDetector)
|
||||||
final def join(address: Address): Unit = {
|
final def join(address: Address): Unit = {
|
||||||
val localState = state.get
|
val localState = state.get
|
||||||
// wipe our state since a node that joins a cluster must be empty
|
// wipe our state since a node that joins a cluster must be empty
|
||||||
val newState = createCleanState copy (joinInProgress = Map.empty + (address -> (Deadline.now + JoinTimeout)))
|
val newState = createCleanState copy (joinInProgress = Map.empty + (address -> (Deadline.now + JoinTimeout)),
|
||||||
|
memberMembershipChangeListeners = localState.memberMembershipChangeListeners)
|
||||||
// wipe the failure detector since we are starting fresh and shouldn't care about the past
|
// wipe the failure detector since we are starting fresh and shouldn't care about the past
|
||||||
failureDetector.reset()
|
failureDetector.reset()
|
||||||
if (!state.compareAndSet(localState, newState)) join(address) // recur
|
if (!state.compareAndSet(localState, newState)) join(address) // recur
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue