Fix perf standby elections when the new active node was also the previous active node (#6561)
This commit is contained in:
parent
b32da5daad
commit
f5be7c8cea
|
@ -646,6 +646,12 @@ func (c *Core) periodicLeaderRefresh(newLeaderCh chan func(), stopCh chan struct
|
|||
lopCount := opCount
|
||||
isLeader, _, newClusterAddr, _ := c.Leader()
|
||||
|
||||
// If we are the leader reset the clusterAddr since the next
|
||||
// failover might go to the node that was previously active.
|
||||
if isLeader {
|
||||
clusterAddr = ""
|
||||
}
|
||||
|
||||
if !isLeader && newClusterAddr != clusterAddr && newLeaderCh != nil {
|
||||
select {
|
||||
case newLeaderCh <- nil:
|
||||
|
|
Loading…
Reference in New Issue