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

resource_control: allow configuration of the maximum retry time for the local bucket #8352

Merged
merged 5 commits into from
Jul 3, 2024

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Jul 2, 2024

What problem does this PR solve?

Issue Number: Close #8349

What is changed and how does it work?

resource_control: allow configuration of the maximum retry time for the local bucket
- Added config `ltb-token-rpc-max-delay`
- Increased default max delay from 500ms to 1s

Check List

Tests

  • Unit test
  • Integration test

Related changes

Release note

None.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none dco-signoff: yes size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 2, 2024
@nolouch nolouch force-pushed the export-config branch 2 times, most recently from 66da8b5 to 5a37dc6 Compare July 2, 2024 08:16
…he local bucket

Signed-off-by: nolouch <nolouch@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 2, 2024
Comment on lines 307 to 308
default:
select {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
default:
select {
default:
}
select {

This can reduce one level of nesting.

Copy link
Contributor Author

@nolouch nolouch Jul 2, 2024

Choose a reason for hiding this comment

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

I removed the changes, and will do it in another PR. Here only introduce the config. cc @JmPotato

Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

The rest LGTM.

Signed-off-by: nolouch <nolouch@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 2, 2024
Copy link
Member

@HuSharp HuSharp left a comment

Choose a reason for hiding this comment

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

rest LGTM

client/resource_group/controller/config.go Outdated Show resolved Hide resolved
client/resource_group/controller/config.go Show resolved Hide resolved
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch
Copy link
Contributor Author

nolouch commented Jul 3, 2024

PTAL @JmPotato

Copy link
Contributor

ti-chi-bot bot commented Jul 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-02 10:06:08.903959745 +0000 UTC m=+1318895.389448577: ☑️ agreed by HuSharp.
  • 2024-07-03 05:46:52.180557119 +0000 UTC m=+1389738.666045950: ☑️ agreed by JmPotato.

Copy link
Contributor

ti-chi-bot bot commented Jul 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@ti-chi-bot ti-chi-bot bot added the approved label Jul 3, 2024
@ti-chi-bot ti-chi-bot bot merged commit 6b25787 into tikv:master Jul 3, 2024
24 checks passed
@nolouch nolouch deleted the export-config branch July 3, 2024 07:06
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 4, 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: #8360.

@ti-chi-bot
Copy link
Member

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

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

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

nolouch commented Jul 4, 2024

/run-cherry-picker

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 4, 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.1: #8364.

nolouch added a commit to nolouch/pd that referenced this pull request Jul 4, 2024
close tikv#8349

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

Signed-off-by: nolouch <nolouch@gmail.com>
nolouch added a commit to nolouch/pd that referenced this pull request Jul 4, 2024
close tikv#8349

Signed-off-by: nolouch <nolouch@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jul 4, 2024
…he local bucket (#8352) (#8364)

close #8349

resource_control: allow configuration of the maximum retry time for the local bucket
- Added config `ltb-token-rpc-max-delay`
- Increased default max delay from 500ms to 1s

Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot bot added a commit that referenced this pull request Jul 4, 2024
…he local bucket (#8352) (#8360)

close #8349

resource_control: allow configuration of the maximum retry time for the local bucket
- Added config `ltb-token-rpc-max-delay`
- Increased default max delay from 500ms to 1s

Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Co-authored-by: nolouch <nolouch@gmail.com>
ti-chi-bot bot added a commit that referenced this pull request Jul 4, 2024
…he local bucket (#8352) (#8361)

close #8349

resource_control: allow configuration of the maximum retry time for the local bucket
- Added config `ltb-token-rpc-max-delay`
- Increased default max delay from 500ms to 1s

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: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Co-authored-by: nolouch <nolouch@gmail.com>
nolouch added a commit to nolouch/pd that referenced this pull request Jul 4, 2024
close tikv#8349

Signed-off-by: nolouch <nolouch@gmail.com>
nolouch added a commit to nolouch/pd that referenced this pull request Jul 4, 2024
close tikv#8349

Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
nolouch pushed a commit that referenced this pull request Jul 4, 2024
…he local bucket (#8352) (#8362)

* resource_control: allow configuration of the maximum retry time for the local bucket

Signed-off-by: nolouch <nolouch@gmail.com>
nolouch added a commit that referenced this pull request Jul 4, 2024
…he local bucket (#8352)  (#8365)

* client/controller: record context error and add slowlog about token bucket (#8344) (#8355)

close #8343, ref #8349

client/controller: record context error and add slowlog about token bucket
- record low process start time, and log it if it's too slow
- record the context error

Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>

* This is an automated cherry-pick of #8352

close #8349

Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>

---------

Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
Signed-off-by: nolouch <nolouch@gmail.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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