-
Notifications
You must be signed in to change notification settings - Fork 728
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
schedulers: add reload config function #7406
Conversation
Signed-off-by: lhy1024 <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
@@ -51,6 +51,8 @@ var ( | |||
type balanceRegionSchedulerConfig struct { | |||
Name string `json:"name"` | |||
Ranges []core.KeyRange `json:"ranges"` | |||
// TODO: whether to support reload it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to talk about the schedulers whose config only contains Ranges
. Do we need to support ReloadConfig
for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion, we will keep TODO for these schedulers.
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7406 +/- ##
==========================================
- Coverage 74.24% 74.23% -0.02%
==========================================
Files 451 451
Lines 49180 49386 +206
==========================================
+ Hits 36515 36663 +148
- Misses 9430 9454 +24
- Partials 3235 3269 +34
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
if len(cfgData) == 0 { | ||
return nil | ||
} | ||
newCfg := &shuffleHotRegionSchedulerConfig{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When do we need to create a newCfg instead of using the old one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the scheduling server watches the change of config, it will call ReloadConfig
to update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean such as splitBucketScheduler
, the ReloadConfig doesn't create a newCfg.
/merge |
@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: 1a9a793
|
@lhy1024: Your PR was out of date, I have automatically updated it for you. 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. 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. |
/hold |
Signed-off-by: lhy1024 <[email protected]>
64ac60c
to
792f26c
Compare
After discussion, we will keep TODO for these schedulers. |
/merge |
@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: 0efb536
|
close tikv#7257 Signed-off-by: lhy1024 <[email protected]>
What problem does this PR solve?
Issue Number: Close #7257
What is changed and how does it work?
Check List
Tests
Release note