-
Notifications
You must be signed in to change notification settings - Fork 724
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
placement: add FitRegion implementation #1904
Conversation
Signed-off-by: disksing <i@disksing.com>
Codecov Report
@@ Coverage Diff @@
## master #1904 +/- ##
=========================================
+ Coverage 77.33% 78.1% +0.76%
=========================================
Files 165 167 +2
Lines 16590 16613 +23
=========================================
+ Hits 12830 12975 +145
+ Misses 2750 2644 -106
+ Partials 1010 994 -16
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.
Unit tests are really necessary for these utility functions
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
for _, rule := range rules { | ||
rf := fitRule(peers, rule) | ||
regionFit.RuleFits = append(regionFit.RuleFits, rf) | ||
// Remove selected. |
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.
does it mean there is only one rule in a range?
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.
Not really. There can be multiple rules in a range, i.e. multiple rules for a region.
Remove selected
here is because a peer can only belong to a Rule.
Signed-off-by: disksing <i@disksing.com> Co-Authored-By: lhy1024 <admin@liudos.us>
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 |
Signed-off-by: disksing i@disksing.com
What problem does this PR solve?
continue merging placement rules.
What is changed and how it works?
add FitRegion implementation
Check List
Tests