pd-ctl: allow higher all-store v1 limits for NextGen
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Development Task
### Context
PD store-limit v1 controls add-peer and remove-peer scheduling in operators per minute. `pd-ctl store limit all` currently applies a fixed maximum of 200 to every kernel type.
The 200 ceiling is sufficient for the current Classic TiKV scale-out profile and should remain the Classic safety boundary. It is too restrictive for loaded NextGen scale-out, where the CSE data path is designed around a 550 MiB/s DATA-volume baseline and may need higher replica-movement concurrency.
The PD rate and storage throughput use different units, so a limit of 1000 operators/min does not mean 1000 MiB/s. Related NextGen data-path tuning and validation is tracked in [cloud-storage-engine#5887](https://github.com/tidbcloud/cloud-storage-engine/issues/5887). Its end-to-end results changed multiple controls and do not establish a gain attributable to the PD store limit alone.
### Proposed behavior
- Keep the `pd-ctl store limit all` maximum at 200 for Classic PD.
- Allow a maximum of 1000 for NextGen PD after checking `/pd/api/v1/status`.
- Fail closed at the Classic boundary when kernel detection is missing or fails.
- Apply the same boundary to the current command, label-filter form, and deprecated all-store command.
This is a `pd-ctl` safety guard, not a server-side invariant. Direct API callers remain responsible for selecting a safe value.
### Acceptance criteria
- Classic accepts up to 200 and rejects larger all-store values.
- NextGen accepts up to 1000 and rejects larger all-store values.
- Values at or below 200 do not require a status lookup.
- Unknown, malformed, or unavailable kernel status fails closed.
- Existing server-side store-limit defaults and new-store inheritance behavior are unchanged.
Contributor guide
Research direction
Start by locating the pd-ctl implementations for `store limit all`, its label-filter form, and the deprecated all-store command, then inspect how `/pd/api/v1/status` is queried. Verify Classic and NextGen acceptance limits, fail-closed behavior for missing or malformed status, and that values at or below 200 avoid the lookup. Run the existing pd-ctl tests and add coverage for the listed acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cli, distributed-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100