Skip to content

Commit

Permalink
Merge pull request #106251 from erikgrinaker/backport23.1-104212
Browse files Browse the repository at this point in the history
release-23.1: kvserver: don't report unreachable followers when quiesced
  • Loading branch information
erikgrinaker authored Jul 7, 2023
2 parents 3eeb436 + 9adc14d commit 2a703f3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions pkg/kv/kvserver/replica_raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -1194,11 +1194,6 @@ func maybeFatalOnRaftReadyErr(ctx context.Context, err error) (removed bool) {
func (r *Replica) tick(
ctx context.Context, livenessMap livenesspb.IsLiveMap, ioThresholdMap *ioThresholdMap,
) (bool, error) {
r.unreachablesMu.Lock()
remotes := r.unreachablesMu.remotes
r.unreachablesMu.remotes = nil
r.unreachablesMu.Unlock()

r.raftMu.Lock()
defer r.raftMu.Unlock()
r.mu.Lock()
Expand All @@ -1209,14 +1204,18 @@ func (r *Replica) tick(
return false, nil
}

for remoteReplica := range remotes {
r.mu.internalRaftGroup.ReportUnreachable(uint64(remoteReplica))
}

if r.mu.quiescent {
return false, nil
}

r.unreachablesMu.Lock()
remotes := r.unreachablesMu.remotes
r.unreachablesMu.remotes = nil
r.unreachablesMu.Unlock()
for remoteReplica := range remotes {
r.mu.internalRaftGroup.ReportUnreachable(uint64(remoteReplica))
}

r.updatePausedFollowersLocked(ctx, ioThresholdMap)

now := r.store.Clock().NowAsClockTimestamp()
Expand Down

0 comments on commit 2a703f3

Please sign in to comment.