tikv / tikv/pd

resource control: align token bucket semantics under Service Limit

Open
#11,266 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Enhancement Task

Follow up on #11240 and #11244 to consistently apply the Fill Rate and Burst Limit semantics introduced by Service Limit across PD and its client. Preserve existing resource-group behavior and keep changes focused on the affected state transitions.

- [ ] Synchronize Service Limit updates and override publication to prevent stale constraints after disabling the limit; cover resource-group mode changes (#11111).
- [ ] Handle client token balances correctly when switching from unlimited to limited mode.
- [ ] Use consistent participants for demand calculation and allocation, preventing negative rate overrides and inflated burst capacity.
- [ ] Preserve refunds for tokens rejected by the service limiter, including zero-capacity limited buckets.
- [ ] Separate configured and effective Fill Rate during initialization so a zero override does not rewrite user settings.
- [ ] Restore override metric series correctly when constraints become active again.
- [ ] Add focused regressions and realistic validation for TiDB node churn, group creation/modification, priority contention, fractional allocations, and Service Limit changes, alongside normal workloads.

Related umbrella: #9296.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Service Limit Fill Rate and Burst Limit state transitions across PD and its client, then read the related issues #11240 and #11244. Validate the listed transitions with focused regressions covering resource-group changes, token balances, refunds, allocations, metrics, and TiDB node churn; done means constraints and overrides remain consistent through limit changes and normal workloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.