-
Notifications
You must be signed in to change notification settings - Fork 722
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: make region scheduler and checkers aware of placement rules #2051
Conversation
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Codecov Report
@@ Coverage Diff @@
## master #2051 +/- ##
==========================================
+ Coverage 76.87% 76.87% +<.01%
==========================================
Files 185 185
Lines 18835 18871 +36
==========================================
+ Hits 14479 14507 +28
+ Misses 3253 3250 -3
- Partials 1103 1114 +11
Continue to review full report at Codecov.
|
server/cluster/cluster.go
Outdated
@@ -200,6 +200,13 @@ func (c *RaftCluster) Start(s Server) error { | |||
return nil | |||
} | |||
|
|||
defaultReplicas := c.opt.GetMaxReplicas() | |||
defaultLocationLabels := c.opt.GetLocationLabels() | |||
c.ruleManager, err = placement.NewRuleManager(c.storage, defaultReplicas, defaultLocationLabels) |
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 we disable the placement rules, will it affect the start process?
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 is always loaded no matter enabled or not
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.
@rleungx fixed.
server/schedulers/balance_test.go
Outdated
} | ||
|
||
func (s *testBalanceRegionSchedulerSuite) checkReplacePendingRegion(c *C, tc *mockcluster.Cluster, opt *mockoption.ScheduleOptions, sb schedule.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.
empty line
Signed-off-by: disksing <i@disksing.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
Signed-off-by: disksing <i@disksing.com>
Please take a look @rleungx |
Signed-off-by: disksing <i@disksing.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.
LGTM
/merge |
/run-all-tests |
@disksing merge failed. |
/merge |
/run-all-tests |
@disksing merge failed. |
/merge |
/run-all-tests |
What problem does this PR solve?
Continue merge placement rules.
What is changed and how it works?
Check List
Tests