-
Notifications
You must be signed in to change notification settings - Fork 719
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: add buckets property to regionInfo struct #4743
Conversation
Signed-off-by: bufferflies <1045931706@qq.com>
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
@@ Coverage Diff @@
## master #4743 +/- ##
==========================================
+ Coverage 74.99% 75.04% +0.04%
==========================================
Files 287 287
Lines 28140 28145 +5
==========================================
+ Hits 21104 21121 +17
+ Misses 5158 5146 -12
Partials 1878 1878
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
server/core/region.go
Outdated
@@ -214,6 +215,14 @@ func (r *RegionInfo) Clone(opts ...RegionCreateOption) *RegionInfo { | |||
return region | |||
} | |||
|
|||
// GetBuckets returns the buckets of the region. | |||
func (r *RegionInfo) GetBuckets() *metapb.Buckets { | |||
if r == nil { |
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 will it happen?
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.
this is the first step, sync regions and api related region will use it, I will split them into different pr. like this:#4699 and pingcap/kvproto#867.
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.
I mean r == nil
Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
[FORMAT CHECKER NOTIFICATION] Notice: Please provide the linked issue number on one line in the PR body, for example: 📖 For more info, you can check the "Linking issues" section in the CONTRIBUTING.md. |
/close see #4670 |
Signed-off-by: bufferflies 1045931706@qq.com
What problem does this PR solve?
This is the first step for the final storage of buckets in memery.
Some api and storage depences on it.
Issue Number: Relate #4668
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release note