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: supports dynamically change the controller config #7042

Merged
merged 11 commits into from
Sep 18, 2023

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Sep 4, 2023

What problem does this PR solve?

Issue Number: Close #7043

What is changed and how does it work?

resource_control: supports dynamically change the controller config 
- supports dynamically changing the controller config
- export the `maxWaitDuration` for the local bucket limiter.

Check List

Tests

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

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 4, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • HuSharp

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 4, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 4, 2023
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 4, 2023
@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 Sep 4, 2023
@nolouch nolouch changed the title resource_control: supports dynamictlly change the controller config resource_control: supports dynamically change the controller config Sep 4, 2023
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #7042 (d154fbf) into master (0888ef6) will decrease coverage by 0.18%.
The diff coverage is 63.51%.

❗ Current head d154fbf differs from pull request most recent head 9c414f0. Consider uploading reports for the commit 9c414f0 to get more accurate results

@@            Coverage Diff             @@
##           master    #7042      +/-   ##
==========================================
- Coverage   74.33%   74.15%   -0.18%     
==========================================
  Files         437      438       +1     
  Lines       46855    46895      +40     
==========================================
- Hits        34831    34777      -54     
- Misses       8947     9029      +82     
- Partials     3077     3089      +12     
Flag Coverage Δ
unittests 74.15% <63.51%> (-0.18%) ⬇️

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

@nolouch nolouch marked this pull request as ready for review September 5, 2023 16:35
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 5, 2023
@nolouch nolouch force-pushed the export-config branch 3 times, most recently from a42cde3 to c35d680 Compare September 5, 2023 16:45
@nolouch nolouch requested a review from HuSharp September 6, 2023 05:27
@nolouch nolouch force-pushed the export-config branch 4 times, most recently from 3e3d08d to 8eda4ec Compare September 6, 2023 06:21
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.

LGTM!

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 13, 2023
Copy link
Member

@CabinfeverB CabinfeverB 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

cb(ctx)
if err := cb(ctx); err != nil {
log.Error("failed to execute leader callback function", errs.ZapError(err))
return
Copy link
Member

Choose a reason for hiding this comment

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

How about continuing?

Copy link
Contributor Author

@nolouch nolouch Sep 14, 2023

Choose a reason for hiding this comment

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

I think here some leaderCallbacks should make sure to run successfully. like resourcemanager load resource meta, or tso service init. ptal @rleungx

and return will re-election, I think it is like always do retry.

Copy link
Member

Choose a reason for hiding this comment

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

I think retry is ok to me and we should limit the retry count or time.

client/resource_group/controller/controller.go Outdated Show resolved Hide resolved
Signed-off-by: nolouch <[email protected]>
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 18, 2023
@nolouch
Copy link
Contributor Author

nolouch commented Sep 18, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 18, 2023

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 18, 2023

This pull request has been accepted and is ready to merge.

Commit hash: d154fbf

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 18, 2023
@ti-chi-bot ti-chi-bot bot merged commit 54eb4e4 into tikv:master Sep 18, 2023
19 checks passed
@nolouch nolouch deleted the export-config branch December 5, 2023 03:32
@nolouch
Copy link
Contributor Author

nolouch commented Dec 5, 2023

/cherry-picker

@nolouch
Copy link
Contributor Author

nolouch commented Dec 5, 2023

/run-cherry-picker

@nolouch nolouch added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed affects-7.1 labels Dec 5, 2023
@nolouch
Copy link
Contributor Author

nolouch commented Dec 5, 2023

/run-cherry-picker

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Dec 5, 2023
nolouch added a commit to ti-chi-bot/pd that referenced this pull request Dec 6, 2023
…ikv#7042)

close tikv#7043

resource_control: supports dynamically change the controller config
- supports dynamically changing the controller config
- export the `maxWaitDuration` for the local bucket limiter.

Signed-off-by: nolouch <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>

fix

Signed-off-by: nolouch <[email protected]>
ti-chi-bot bot pushed a commit that referenced this pull request Dec 7, 2023
…7495)

close #7043

resource_control: supports dynamically change the controller config 
- supports dynamically changing the controller config
- export the `maxWaitDuration` for the local bucket limiter.

Signed-off-by: nolouch <[email protected]>
Signed-off-by: husharp <[email protected]>

Co-authored-by: nolouch <[email protected]>
Co-authored-by: Hu# <[email protected]>
Co-authored-by: ShuNing <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

supports dynamically change the controller config
5 participants