From 000d36cc6afb7c649d4fb4b6eb61722d9389efbc Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Sun, 5 Dec 2021 19:50:20 -0500 Subject: [PATCH] kv: ignore internalRaftGroup in Replica.Metric A replica cannot unquiesce if its internalRaftGroup is nil, so this condition was redundant but confusing. --- pkg/kv/kvserver/replica_metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/replica_metrics.go b/pkg/kv/kvserver/replica_metrics.go index efbb986a7b18..fd7db9b5095a 100644 --- a/pkg/kv/kvserver/replica_metrics.go +++ b/pkg/kv/kvserver/replica_metrics.go @@ -59,7 +59,7 @@ func (r *Replica) Metrics( r.mu.RLock() raftStatus := r.raftStatusRLocked() leaseStatus := r.leaseStatusAtRLocked(ctx, now) - quiescent := r.mu.quiescent || r.mu.internalRaftGroup == nil + quiescent := r.mu.quiescent desc := r.mu.state.Desc conf := r.mu.conf raftLogSize := r.mu.raftLogSize