Skip to content

Commit

Permalink
storage: Stop calling raftGroup.TickQuiesced
Browse files Browse the repository at this point in the history
This was a workaround for the interaction between quiesced ranges and
CheckQuorum, and is no longer needed now that we have switched from
CheckQuorum to PreVote.

Reverts #9407
  • Loading branch information
bdarnell committed Nov 2, 2016
1 parent 6596343 commit 601cb79
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pkg/storage/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -2216,26 +2216,6 @@ func (r *Replica) tickRaftMuLocked() (bool, error) {
return false, nil
}
if r.mu.quiescent {
// While a replica is quiesced we still advance its logical clock. This is
// necessary to avoid a scenario where the leader quiesces and a follower
// does not. The follower calls an election but the election fails because
// the leader and other follower believe that no time in the current term
// has passed. The Raft group is then in a state where one member has a
// term that is advanced which will then cause subsequent heartbeats from
// the existing leader to be rejected in a way that the leader will step
// down. This situation is caused by an interaction between quiescence and
// the Raft CheckQuorum feature which relies on the logical clock ticking
// at roughly the same rate on all members of the group.
//
// By ticking the logical clock (incrementing an integer) we avoid this
// situation. If one of the followers does not quiesce it will call an
// election but the election will succeed. Note that while we expect such
// elections from quiesced followers to be extremely rare, it is very
// difficult to completely eliminate them so we want to minimize the
// disruption when they do occur.
//
// For more details, see #9372.
r.mu.internalRaftGroup.TickQuiesced()
return false, nil
}
if r.maybeQuiesceLocked() {
Expand Down

0 comments on commit 601cb79

Please sign in to comment.