Members ordered by address only, see #2405
* The special ordering of status Exiting makes ordering and equals inconsistent * Take the Exiting status into account when looking for leader
This commit is contained in:
parent
7f1a4d3ab6
commit
6d1631aa8c
6 changed files with 37 additions and 38 deletions
|
|
@ -572,7 +572,7 @@ private[cluster] final class ClusterCoreDaemon(environment: ClusterEnvironment)
|
|||
val localGossip = latestGossip
|
||||
val localMembers = localGossip.members
|
||||
|
||||
val isLeader = localMembers.nonEmpty && (selfAddress == localMembers.head.address)
|
||||
val isLeader = localGossip.isLeader(selfAddress)
|
||||
|
||||
if (isLeader && isAvailable) {
|
||||
// only run the leader actions if we are the LEADER and available
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue