Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvserver: storepool not updated after change replicas that removes leaseholder #89395

Open
kvoli opened this issue Oct 5, 2022 · 0 comments
Open
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

Comments

@kvoli
Copy link
Collaborator

kvoli commented Oct 5, 2022

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:

rq.store.cfg.StorePool.UpdateLocalStoresAfterLeaseTransfer(
source, target, rangeQPS)

Whereas on a change replicas call:

rq.store.cfg.StorePool.UpdateLocalStoreAfterRebalance(
chg.Target.StoreID, rangeUsageInfo, chg.ChangeType)
}

Only the replica counts are updated, not the lease count or QPS if the leaseholder is removed.

func (sp *StorePool) UpdateLocalStoreAfterRebalance(

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

@kvoli kvoli added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-kv-distribution Relating to rebalancing and leasing. labels Oct 5, 2022
@kvoli kvoli self-assigned this Oct 5, 2022
@blathers-crl blathers-crl bot added the T-kv KV Team label Oct 5, 2022
@kvoli kvoli removed their assignment Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant