-
Notifications
You must be signed in to change notification settings - Fork 721
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
opt, schedulers: consider placement rules when verify region healthy #1897
Conversation
Signed-off-by: disksing <i@disksing.com>
region.learners = learners | ||
peers := region.meta.GetPeers() | ||
for i := range peers { | ||
for _, l := range learners { |
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.
Just mention it, why not try to keep the same style of the loop like for j := range learners
, then use learners[j]
later instead.
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.
only because l
is shorter than learners[j]
.
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.
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
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 |
Signed-off-by: disksing i@disksing.com
What problem does this PR solve?
continue merging placement rules.
What is changed and how it works?
core.RegionHealth
withopt.RegionHealth
. When placement rules is enabled, it allows learner peers.core.RegionHealthAllowPending
withopt.RegionHealthAllowPending
. When placement rules is enabled, it allows learner peers.len(region.GetPeers()) == cluster.GetMaxReplicas()
withopt.IsRegionReplicated
. When placement rules is enabled, it checks if peers can fit rules.Check List
Tests