server, client: expose store scheduling state in GetStore#11041
server, client: expose store scheduling state in GetStore#11041LykxSassinator wants to merge 3 commits into
Conversation
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the 📖 For more info, you can check the "Linking issues" section in the CONTRIBUTING.md. |
What problem does this PR solve?
Issue Number: Ref tikv/client-go#2012
PD owns the slow-store eviction and recovery-time policy, but the existing
GetStorepath only exposesmetapb.Storeand drops fields carried by thefull
GetStoreResponse. Consequently, downstream clients cannot distinguish alocally recovered Store from one that PD still keeps evicted as slow.
This PR exposes PD's scheduling decision through
GetStoreResponse, enablingclient-go proposal 3 to keep non-leader replica reads excluded until PD
explicitly re-admits the Store.
Depends on pingcap/kvproto#1503.
What is changed and how does it work?
GetStoreresponse now populatesStoreSchedulingState.evicted_as_slow_storefromcore.StoreInfo.EvictedAsSlowStore().pd.RPCClientExt.GetStoreResponse, which returns the completeprotobuf response while keeping the existing
RPCClientandClient.GetStoreAPIs source-compatible.GetStorebehavior unchanged by implementing it on top ofGetStoreResponseand retaining existing response validation.SchedulingStateunset: Router'smetadata cache does not retain PD leader's dynamic scheduling decision, and
reporting a default
falsevalue would incorrectly imply that the Store iseligible.
unknownsemantics.The
kvprotodependency is temporarily replaced with the branch for PR #1503.The replacement should be removed and dependencies tidied after that PR merges.
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs/pingcap/docs-cn:pingcap/tiup:Release note