[DNM] test rate-limited Leader return to a restarted TiKV store - #11160
[DNM] test rate-limited Leader return to a restarted TiKV store#11160exit-code-1 wants to merge 2 commits into
Conversation
Add a disabled-by-default per-target token bucket to the balance-leader scheduler for staging experiments. Expose persistent runtime configuration and pd-ctl commands with a fixed burst of one leader. Signed-off-by: Zhang Haoyuan <20194550@qq.com>
|
[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 |
|
Hi @exit-code-1. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
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:
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 |
Keep diagnostic plan collection separate from a true dry run so normal scheduling always consumes target-store tokens. Roll back runtime configuration and return an error when persistence fails. Signed-off-by: Zhang Haoyuan <20194550@qq.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?
Warning
DNM / test-only / do not merge. This branch exists only for staging experiments for tidbcloud/cloud-storage-engine#5774.
Issue Number: N/A (DNM test PR)
After a TiKV restart and removal of
evict-leader, automatic leader balancing can return many Leaders to the restarted target Store in a short interval. This makes it hard to separate delayed admission from paced admission when measuring cold working-set/runtime I/O, Prewrite latency, business tail latency, and QPS.What is changed and how does it work?
Configuration example:
Readback for the example:
{ "inbound-leader-transfer-rate-limits": { "42": { "leaders-per-second": 2, "burst": 1 } } }Semantics and scope:
store_id.balance-leader-schedulerautomatic transfers are limited. Manualadmin-transfer-leader, scatter/balance-range, hot-region, label/rule-checker, evict/grant/shuffle, and witness transfer paths bypass this test limiter.Staging comparison:
evict-leaderuntil the readiness/I/O gate, then remove it with no per-target rate entry.evict-leader, then verify readback and observe Leader count, runtime I/O, Prewrite/tail latency, and QPS.This PR does not start or submit any staging/TCMS execution.
Check List
Tests
ReloadConfigpathmake pd-ctlCode changes
Side effects
Validation
make gotest GOTEST_ARGS=\"./pkg/schedule/schedulers -count=1\"make gotest GOTEST_ARGS=\"./pkg/schedule/schedulers -run TestInboundLeaderTransferRateLimit -count=1\"make gotest GOTEST_ARGS="./pkg/schedule/schedulers -run TestBalanceLeaderInboundTargetRateLimit -count=1"GOTOOLCHAIN=go1.25.12 go test -race ./pkg/schedule/schedulers -run TestBalanceLeaderInboundTargetRateLimit -count=1make static GO_EFFECTIVE_TOOLCHAIN=go1.25.12: 0 issuesGOTOOLCHAIN=go1.25.12 go test ./pd-ctl/pdctl/command -count=1make pd-ctlgit diff --checkRelease note