Skip to content

Commit

Permalink
Merge #26291
Browse files Browse the repository at this point in the history
26291: storage: Tick all replicas, not just unquiesced ones r=bdarnell a=bdarnell

This reverts the main effect of #24956. The supporting infrastructure
is left in place to minimize merge conflicts and to aid in diagnosing
why the maps get out of sync.

Fixes #26257

Release note: None

Co-authored-by: Ben Darnell <[email protected]>
  • Loading branch information
craig[bot] and bdarnell committed May 31, 2018
2 parents d844b57 + 3106615 commit a394a07
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3693,16 +3693,15 @@ func (s *Store) raftTickLoop(ctx context.Context) {
case <-ticker.C:
rangeIDs = rangeIDs[:0]

s.unquiescedReplicas.Lock()
for k := range s.unquiescedReplicas.m {
s.mu.replicas.Range(func(k int64, v unsafe.Pointer) bool {
// Why do we bother to ever queue a Replica on the Raft scheduler for
// tick processing? Couldn't we just call Replica.tick() here? Yes, but
// then a single bad/slow Replica can disrupt tick processing for every
// Replica on the store which cascades into Raft elections and more
// disruption.
rangeIDs = append(rangeIDs, k)
}
s.unquiescedReplicas.Unlock()
rangeIDs = append(rangeIDs, roachpb.RangeID(k))
return true
})

s.scheduler.EnqueueRaftTick(rangeIDs...)
s.metrics.RaftTicks.Inc(1)
Expand Down

0 comments on commit a394a07

Please sign in to comment.