-
Notifications
You must be signed in to change notification settings - Fork 720
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: add conflict detect for grant hot leader scheduler #4903
Changes from all commits
071b116
4052699
ec5ecf9
201adb5
d3a9bf7
1f7991c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,9 +355,10 @@ func NewSplitBucketSchedulerCommand() *cobra.Command { | |
// NewGrantHotRegionSchedulerCommand returns a command to add a grant-hot-region-scheduler. | ||
func NewGrantHotRegionSchedulerCommand() *cobra.Command { | ||
c := &cobra.Command{ | ||
Use: "grant-hot-region-scheduler <store_leader_id> <store_leader_id,store_peer_id_1,store_peer_id_2>", | ||
Short: "add a scheduler to grant hot region to fixed stores", | ||
Run: addSchedulerForGrantHotRegionCommandFunc, | ||
Use: "grant-hot-region-scheduler <store_leader_id> <store_leader_id,store_peer_id_1,store_peer_id_2>", | ||
Short: `add a scheduler to grant hot region to fixed stores. | ||
Note: If there is balance-hot-region-scheduler running, please remove it first, otherwise grant-hot-region-scheduler will not work.`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it ok if the hot scheduler is not work but exist, for example being pause status? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this pr, even though the hot-scheduler is paused, adding grant-hot-leader-scheduler is still not allowed. If this is allowed, let's look at an example where I suspend the hot-scheduler for ten seconds and then add grant-hot-leader-scheduler, which is fine for ten seconds, but after ten seconds the hot-scheduler resumes scheduling and they will conflict again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, understand. BTW, the hot scheduler config still exist if I enable it again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the configuration still exists. If you think this pr is ok, I will cancel /hold. |
||
Run: addSchedulerForGrantHotRegionCommandFunc, | ||
} | ||
return c | ||
} | ||
|
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, is it necessary to set
store_leader_id
again?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.
Sure, I also think it is not necessary. I will modify it in another pr.