-
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
scheduler: GetType() returns types.CheckerSchedulerType directly #8440
Conversation
Signed-off-by: okJiang <[email protected]>
…Counter Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Skipping CI for Draft Pull Request. |
Signed-off-by: okJiang <[email protected]>
@@ -395,7 +382,7 @@ func scheduleEvictLeaderOnce(name, typ string, cluster sche.SchedulerCluster, co | |||
for _, t := range targets { | |||
targetIDs = append(targetIDs, t.GetID()) | |||
} | |||
op, err := operator.CreateTransferLeaderOperator(typ, cluster, region, target.GetID(), targetIDs, operator.OpLeader) | |||
op, err := operator.CreateTransferLeaderOperator(name, cluster, region, target.GetID(), targetIDs, operator.OpLeader) |
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.
Using name instead of type for desc is ok
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8440 +/- ##
==========================================
+ Coverage 77.32% 77.39% +0.07%
==========================================
Files 472 472
Lines 61811 61727 -84
==========================================
- Hits 47793 47773 -20
+ Misses 10445 10390 -55
+ Partials 3573 3564 -9
Flags with carried forward coverage won't be shown. Click here to find out more. |
/cc @JmPotato |
Signed-off-by: okJiang <[email protected]>
AddSchedulerCfg(string, []string) | ||
RemoveSchedulerCfg(string) | ||
IsSchedulerDisabled(types.CheckerSchedulerType) bool | ||
AddSchedulerCfg(types.CheckerSchedulerType, []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.
We can consider removing this interface. here is some background:
- v2.x all scheduler configs are stored in the global config
Config.SchedulerConfig
- v3.x let the scheduler has it's own config, that's store in another key/value in etcd *: supports http handler for each scheduler #1733
To ensure compatibility, both configurations are retained, and we can now clean up the old one. However, there is one problem that needs to be solved: the default scheduler state needs special handling.
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.
The update of this comment is too large, and it seems not related to current issue. It is better to do it in a new pr. I filed an issue to track it. #8474
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.
BTW, do you mean all this interface or these two function?
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JmPotato, niubell, nolouch 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 |
What problem does this PR solve?
Issue Number: Ref #8379
What is changed and how does it work?
Check List
Tests
Release note