Skip to content

Conversation

@JmPotato
Copy link
Member

@JmPotato JmPotato commented Jul 23, 2025

What problem does this PR solve?

Issue Number: ref #9296.

What is changed and how does it work?

By overriding the burst limit with the service limit for burstable groups to enhance the constraint imposed by the service limit.

Check List

Tests

  • Unit test
  • Integration test
  • Mannual test
image image

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 23, 2025
@JmPotato JmPotato changed the title feat: invalidate the burstable groups by overriding to service limit feat(resourcemanager): invalidate the burstable groups by overriding to service limit Jul 23, 2025
}
// First, try to get tokens from the resource group.
tb, trickleTimeMs := rg.RUSettings.RU.request(now, requiredToken, targetPeriodMs, clientUniqueID)
rg.Unlock()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 274 updates the lastLimitedTokens of rg, so we should still hold the lock to avoid race. Better change L273 instead of release the lock too early.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@JmPotato
Copy link
Member Author

/cc @glorv @lhy1024 @rleungx

@ti-chi-bot ti-chi-bot bot requested review from lhy1024 and rleungx July 23, 2025 09:09
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 23, 2025

@JmPotato: GitHub didn't allow me to request PR reviews from the following users: glorv.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @glorv @lhy1024 @rleungx

Instructions 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.

Signed-off-by: JmPotato <github@ipotato.me>
@JmPotato JmPotato requested a review from glorv July 23, 2025 09:33
Copy link
Contributor

@glorv glorv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.41%. Comparing base (59b75f5) to head (277396e).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9577      +/-   ##
==========================================
+ Coverage   76.34%   76.41%   +0.07%     
==========================================
  Files         482      482              
  Lines       75895    75911      +16     
==========================================
+ Hits        57940    58006      +66     
+ Misses      14376    14336      -40     
+ Partials     3579     3569      -10     
Flag Coverage Δ
unittests 76.41% <96.96%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 24, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024, rleungx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 24, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-07-24 03:28:42.438208695 +0000 UTC m=+46839.172225285: ☑️ agreed by rleungx.
  • 2025-07-24 03:29:29.225014329 +0000 UTC m=+46885.959030919: ☑️ agreed by lhy1024.

@ti-chi-bot ti-chi-bot bot merged commit fc5c37e into tikv:master Jul 24, 2025
35 of 37 checks passed
@JmPotato JmPotato deleted the fix_service_limit branch July 24, 2025 03:55
okJiang pushed a commit to okJiang/pd that referenced this pull request Aug 7, 2025
…to service limit (tikv#9577)

ref tikv#9296

By overriding the burst limit with the service limit for burstable groups to enhance the constraint imposed by the service limit.

Signed-off-by: JmPotato <github@ipotato.me>
Signed-off-by: okjiang <819421878@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants