-
Notifications
You must be signed in to change notification settings - Fork 725
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, schedulers: make schedulers aware of placement rules #1999
Conversation
Signed-off-by: disksing <i@disksing.com>
Codecov Report
@@ Coverage Diff @@
## master #1999 +/- ##
==========================================
+ Coverage 76.83% 76.88% +0.04%
==========================================
Files 183 183
Lines 18301 18323 +22
==========================================
+ Hits 14062 14088 +26
+ Misses 3175 3172 -3
+ Partials 1064 1063 -1
Continue to review full report at Codecov.
|
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 add tests for this PR?
server/schedulers/hot_region.go
Outdated
srcPeer := srcRegion.GetStorePeer(srcStoreID) | ||
if srcPeer == nil { | ||
return nil, nil, nil, Influence{} | ||
} |
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.
why need to judge it in hot region rather than other schedulers?
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.
Why not use continue
to just skip this peer?
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.
@shafreeck good idea.
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.
@lhy1024 because hot region scheduler selects region from stats, which may be out of date. Others do not have this problem.
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.
@lhy1024 For shcedulers that include label related tests (hotWrite and shuffleHot), I have changed them to test twice, the second time run with placement rules enabled.
Signed-off-by: disksing <i@disksing.com>
PTAL @rleungx @shafreeck |
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 |
…1999) Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing i@disksing.com
What problem does this PR solve?
Make schedulers aware of placement rules.
What is changed and how it works?
When placement rule is enabled, use
RuleFilter
instead ofDistinctScoreFilter
.