-
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
schedule: combine store limit and store balance rate #2437
Conversation
284e68f
to
e916505
Compare
e916505
to
b42a43a
Compare
Codecov Report
@@ Coverage Diff @@
## master #2437 +/- ##
==========================================
+ Coverage 77.06% 77.43% +0.37%
==========================================
Files 204 204
Lines 22079 22121 +42
==========================================
+ Hits 17015 17130 +115
+ Misses 3773 3714 -59
+ Partials 1291 1277 -14
Continue to review full report at Codecov.
|
@@ -148,7 +148,6 @@ func (s *storeStatistics) Collect() { | |||
configs["high-space-ratio"] = s.opt.GetHighSpaceRatio() | |||
configs["low-space-ratio"] = s.opt.GetLowSpaceRatio() | |||
configs["tolerant-size-ratio"] = s.opt.GetTolerantSizeRatio() | |||
configs["store-balance-rate"] = s.opt.GetStoreBalanceRate() |
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 users try to set this config, will we show that it has been expired?
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.
It will show the message now.
@@ -539,6 +546,11 @@ func (mc *Cluster) GetMaxReplicas() int { | |||
return mc.ScheduleOptions.GetMaxReplicas() | |||
} | |||
|
|||
// GetStoreLimitByType mocks method. |
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 to emphasize ByType
?
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.
what do you mean "emphasize ByType"?
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 replacing with GetStoreLimit
?
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 think both GetStoreLimit
and GetStoreLimitByType
are ok here.
6dd271c
to
ea46523
Compare
/run-all-tests |
1 similar comment
/run-all-tests |
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.
rest LGTM..
tools/pd-ctl/README.md
Outdated
>> store limit region-remove // Show limits of removing region operation for all stores | ||
>> store limit // Show limits of adding peer operation for all stores | ||
>> store limit add-peer // Show limits of adding peer operation for all stores | ||
>> store limit remove-peer // Show limits of removing peer operation for all stores | ||
>> store limit all 5 // Limit 5 adding region operations per minute for all stores |
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.
store limit all 5
the command only set for add-peer
, can we set remove-peer
at the same time?
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'm not sure it's better. What is your opinion? @lhy1024
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.
Before, the user only needed one command. Now users think that the speed has been increased, but in fact there is still a speed limit for remove-peer
.
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
e4c8e79
to
ce5764e
Compare
Signed-off-by: Ryan Leung <rleungx@gmail.com>
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 rest LGTM
c, err := h.GetOperatorController() | ||
if err != nil { | ||
return err | ||
func (h *Handler) SetAllStoresLimit(ratePerMin float64, limitType storelimit.Type) error { |
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 found there is a lot of code about set storelimit
, I don’t know if they can be simplified
/merge |
/run-all-tests |
cherry pick to release-4.0 failed |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
What problem does this PR solve?
Close #2245.
What is changed and how it works?
This PR mainly does these things:
*region
to*peer
RemoveScheduler
fromOptions
toCluster
interfaceCheck List
Tests
Release note