kvserver: update AdminRelocateRange to use explicit swaps of voters and non-voters #62370
Labels
A-kv-replication
Relating to Raft, consensus, and coordination.
A-kv-replication-constraints
GA-blocker
AdminRelocateRange
currently doesn’t make use of the ability to promote non-voters to voters, demote voters to non-voters or swap voters and non-voters. Because of this limitation, the mergeQueue has to resort to a fairly complex way of determining which targets to relocate a range’s replicas to during a merge in order to avoid redundant data movement.There are a few problems with this:
num_voters
andvoter_constraints
#57184. We’ve since introduced the concept ofvoter_constraints
which govern the constraints over just the set of voting replicas. This means that the relocation algorithm computes results that may not necessarily meet the {voter_}constraints placed over the RHS. In such cases, the range merge will fail.cockroach/pkg/kv/kvserver/replica_command.go
Lines 2547 to 2559 in df1c620
We need to update
AdminRelocateRange
to use the aforementioned voter<->non-voter swaps and simply have the merge queue directly call into it, instead of having it perform its own calculation of where to move the {voter,non-voter} replicas.The text was updated successfully, but these errors were encountered: