cockroachdb / cockroachdb/cockroach

kvserver: include only voters in state replicate when checking if range can make progress on replication changes

Open
#114,570 1 comment 0 reactions 0 assignees View on GitHub
A-kv-distribution C-enhancement T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**

When making replication changes, the proposer will check that the range can make progress:

https://github.com/cockroachdb/cockroach/blob/b06849b9a2a2c0aab6950764ddff1bb125119df5/pkg/kv/kvserver/replica_command.go#L2386-L2394

This check excludes non-live voters from the perspective of node liveness, but doesn't consider the raft status of replicas.

This can lead to replication changes which result in temporary unavailability like seen in https://github.com/cockroachdb/cockroach/issues/114349.

Where replicas which are behind `StateSnapshot` are included in the quorum, despite not participating until being caught up.

**Describe the solution you'd like**

Exclude replicas which are not in `StateReplicate` when assessing if the range can make progress here:

https://github.com/cockroachdb/cockroach/blob/b06849b9a2a2c0aab6950764ddff1bb125119df5/pkg/kv/kvserver/replica_command.go#L2386C30-L2386C30

Jira issue: CRDB-33570

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.