Skip to content

Commit

Permalink
Fix perf standby elections when the new active node was also the prev…
Browse files Browse the repository at this point in the history
…ious active node (#6561)
  • Loading branch information
briankassouf authored Apr 10, 2019
1 parent 76677bf commit 3cc5d05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vault/ha.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3cc5d05

Please # to comment.