kvserver: storepool not updated after change replicas that removes leaseholder #89395
Labels
A-kv-distribution
Relating to rebalancing and leasing.
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-kv
KV Team
Describe the problem
When removing the leaseholder using
changeReplicas
in the replicate queue, via a joint config, the storepool is not updated locally to reflect the change.This is currently only updated on explicit lease transfers:
cockroach/pkg/kv/kvserver/replicate_queue.go
Lines 1865 to 1866 in 9ac6fea
Whereas on a change replicas call:
cockroach/pkg/kv/kvserver/replicate_queue.go
Lines 1911 to 1913 in 9ac6fea
Only the replica counts are updated, not the lease count or QPS if the leaseholder is removed.
cockroach/pkg/kv/kvserver/allocator/storepool/store_pool.go
Line 468 in 9ac6fea
Expected behavior
ChangeReplicas
called from the replicate queue, which removes the leaseholder and adds a new leaseholder updates the local storepool accounting to reflect the change on success.Jira issue: CRDB-20243
The text was updated successfully, but these errors were encountered: