=clu #13875 Fix regression in leader selection
* The leader is selected by picking the first reachable member, but in #13875 we had to let the self member be unreachable in the Reachability table and that was not considered in the logic of the leader selection. * That means changed behavior that is unwanted, especially when there is only one node left the leader could be evaluated to None instead of Some(selfUniqueAddress). * Note that #13875 has not been released yet.
This commit is contained in:
parent
109187e364
commit
fe98dae650
5 changed files with 34 additions and 22 deletions
|
|
@ -760,7 +760,7 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef) extends Actor with
|
|||
* Runs periodic leader actions, such as member status transitions, assigning partitions etc.
|
||||
*/
|
||||
def leaderActions(): Unit =
|
||||
if (latestGossip.isLeader(selfUniqueAddress)) {
|
||||
if (latestGossip.isLeader(selfUniqueAddress, selfUniqueAddress)) {
|
||||
// only run the leader actions if we are the LEADER
|
||||
val firstNotice = 20
|
||||
val periodicNotice = 60
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue