-
Notifications
You must be signed in to change notification settings - Fork 726
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
mcs: support scheduler config forward and enable some tests #7256
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. |
@@ -160,8 +169,11 @@ func (suite *schedulerTestSuite) checkScheduler(cluster *tests.TestCluster) { | |||
checkSchedulerCommand(args, expected) | |||
|
|||
// check update success | |||
expectedConfig["store-id-ranges"] = map[string]interface{}{"2": []interface{}{map[string]interface{}{"end-key": "", "start-key": ""}}, "3": []interface{}{map[string]interface{}{"end-key": "", "start-key": ""}}} | |||
checkSchedulerConfigCommand(expectedConfig, schedulers[idx]) | |||
// FIXME: remove this check after scheduler config is updated |
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.
But scheduler handler in scheduling server cannot update config, such as grant-leader-scheduler
, grant-hot-region-scheduler
, balance-hot-region-scheduler
, evict-slow-store-scheduler
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.
return schedulers, nil | ||
// The default scheduler could not be deleted, it could only be disabled. | ||
// TODO: Should we distinguish between disabled and removed schedulers? | ||
var enabledSchedulers []string |
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.
Should we distinguish between disabled and removed schedulers?
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 not distinguish them.
…region-scheduler, evict-slow-store-scheduler Signed-off-by: lhy1024 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #7256 +/- ##
==========================================
- Coverage 74.42% 74.38% -0.04%
==========================================
Files 446 446
Lines 48288 48339 +51
==========================================
+ Hits 35939 35958 +19
- Misses 9187 9192 +5
- Partials 3162 3189 +27
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]>
a231728
to
77c19d4
Compare
router.GET("/diagnostic/:name", getDiagnosticResult) | ||
router.GET("/config/:name/:suffix", getSchedulerConfigByName) | ||
// TODO: in the future, we should split pauseOrResumeScheduler to two different APIs. | ||
// And we need to do one-to-two forwarding in the API middleware. | ||
router.POST("/:name", pauseOrResumeScheduler) |
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.
How about unifying these formats?
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.
How about
router.GET("", getSchedulers)
router.GET("/:name", getDiagnosticResult)
router.POST("/:name", pauseOrResumeScheduler)
router.GET("/config/:name/:suffix", getSchedulerConfigByName)
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.
How about using
router.GET("", getSchedulers)
router.GET("/:name/diagnose", getDiagnosticResult)
router.POST("/:name", pauseOrResumeScheduler)
router.GET("/:name/config", getSchedulerConfigByName)
Signed-off-by: lhy1024 <[email protected]>
83d8c48
to
d7adde1
Compare
Signed-off-by: lhy1024 <[email protected]>
router.GET("/config/:name/list", getSchedulerConfigByName) | ||
router.GET("/config/:name/roles", getSchedulerConfigByName) // compatibility for shuffle-region-scheduler |
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.
Do we need these two?
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.
Yes, otherwise we'll modify shuffle region scheduler
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.
unify to "/list" and use new api in pd-ctl
Signed-off-by: lhy1024 <[email protected]>
/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: 71da057
|
@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. |
ref tikv#5839 Signed-off-by: lhy1024 <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
What problem does this PR solve?
Issue Number: Ref #5839
What is changed and how does it work?
Check List
Tests
Release note