Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controller: fix the low_ru request missed #8368

Merged
merged 3 commits into from
Jul 8, 2024
Merged

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Jul 5, 2024

What problem does this PR solve?

Issue Number: Close #8349

What is changed and how does it work?

controller: fix the low_ru request missed 

The problem is that `c.run.currentRequests` is shared by all groups.
If one group triggers a token request that isn't handled by the response, the other group's requests will be discarded.
Here, we do not discard the low_ru triggers.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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. labels Jul 5, 2024
@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.2 labels Jul 5, 2024
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 5, 2024
@nolouch nolouch requested review from JmPotato and HuSharp July 5, 2024 07:53
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
@HuSharp
Copy link
Member

HuSharp commented Jul 5, 2024

ci failed

2024-07-05T08:05:20.6795433Z     limiter_test.go:164: 
2024-07-05T08:05:20.6796168Z         	Error Trace:	/home/runner/work/pd/pd/client/resource_group/controller/limiter_test.go:164
2024-07-05T08:05:20.6796820Z         	Error:      	Not equal: 
2024-07-05T08:05:20.6797226Z         	            	expected: 4s
2024-07-05T08:05:20.6797633Z         	            	actual  : 0s
2024-07-05T08:05:20.6797983Z         	Test:       	TestCancel

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 5, 2024
Signed-off-by: nolouch <nolouch@gmail.com>
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.14%. Comparing base (aecb4ab) to head (64faca0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8368      +/-   ##
==========================================
- Coverage   77.15%   77.14%   -0.02%     
==========================================
  Files         470      470              
  Lines       61681    61686       +5     
==========================================
- Hits        47589    47586       -3     
- Misses      10503    10513      +10     
+ Partials     3589     3587       -2     
Flag Coverage Δ
unittests 77.14% <100.00%> (-0.02%) ⬇️

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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 8, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, JmPotato

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

The pull request process is described here

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

Copy link
Contributor

ti-chi-bot bot commented Jul 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-05 08:45:08.044259805 +0000 UTC m=+1605.279493915: ☑️ agreed by HuSharp.
  • 2024-07-08 03:44:03.486196045 +0000 UTC m=+242740.721430158: ☑️ agreed by JmPotato.

@ti-chi-bot ti-chi-bot bot merged commit 85d650b into tikv:master Jul 8, 2024
25 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8371.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 8, 2024
close tikv#8349

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8372.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 8, 2024
close tikv#8349

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 8, 2024
close tikv#8349

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8373.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.2: #8374.

@nolouch nolouch deleted the fix-missed branch July 8, 2024 03:56
ti-chi-bot bot pushed a commit that referenced this pull request Jul 8, 2024
close #8349

controller: fix the low_ru request missed 

The problem is that `c.run.currentRequests` is shared by all groups.
If one group triggers a token request that isn't handled by the response, the other group's requests will be discarded.
Here, we do not discard the low_ru triggers.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jul 8, 2024
close #8349

controller: fix the low_ru request missed 

The problem is that `c.run.currentRequests` is shared by all groups.
If one group triggers a token request that isn't handled by the response, the other group's requests will be discarded.
Here, we do not discard the low_ru triggers.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jul 8, 2024
close #8349

controller: fix the low_ru request missed 

The problem is that `c.run.currentRequests` is shared by all groups.
If one group triggers a token request that isn't handled by the response, the other group's requests will be discarded.
Here, we do not discard the low_ru triggers.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: nolouch <nolouch@gmail.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 needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.2 release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exceeded resource group quota limitation if request tokens exceeded 500ms
4 participants