-
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
core: support range for random selection #1783
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1783 +/- ##
==========================================
- Coverage 78.1% 77.95% -0.16%
==========================================
Files 167 167
Lines 16851 16907 +56
==========================================
+ Hits 13162 13180 +18
- Misses 2613 2642 +29
- Partials 1076 1085 +9
Continue to review full report at Codecov.
|
|
757e9eb
to
dd25be6
Compare
|
68fbffa
to
fdc8b60
Compare
@@ -460,25 +452,95 @@ func (rm *regionMap) TotalSize() int64 { | |||
return rm.totalSize | |||
} | |||
|
|||
// regionSubTree is used to manager different types of regions. | |||
type regionSubTree struct { |
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 name regionSubTree
and regionTree
seems confused. Maybe we should name it according to the purpose?
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.
Yes, but I cannot find a proper name.
d0dc280
to
46a47f6
Compare
ec0cb2f
to
fc651fe
Compare
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. PTAL @Luffbee
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>
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.
LGTM
/run-all-tests |
What problem does this PR solve?
This PR is mainly for supporting range for schedulers.
What is changed and how it works?
This PR changes the region map to region tree and supports random selection according to a given range.
Check List
Tests
Side effects