diff --git a/pkg/kv/kvserver/store_rebalancer.go b/pkg/kv/kvserver/store_rebalancer.go index cb4964f2ca0d..4fa981762ac7 100644 --- a/pkg/kv/kvserver/store_rebalancer.go +++ b/pkg/kv/kvserver/store_rebalancer.go @@ -425,6 +425,14 @@ func (sr *StoreRebalancer) chooseLeaseToTransfer( var raftStatus *raft.Status preferred := sr.rq.allocator.preferredLeaseholders(zone, candidates) + + // Filter both the list of preferred stores as well as the list of all + // candidate replicas to only consider live (non-suspect, non-draining) + // nodes. + const includeSuspectAndDrainingStores = false + preferred, _ = sr.rq.allocator.storePool.liveAndDeadReplicas(preferred, includeSuspectAndDrainingStores) + candidates, _ = sr.rq.allocator.storePool.liveAndDeadReplicas(candidates, includeSuspectAndDrainingStores) + for _, candidate := range candidates { if candidate.StoreID == localDesc.StoreID { continue