Skip to content
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

Closed

Conversation

bufferflies
Copy link
Contributor

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

 None.

Signed-off-by: bufferflies <1045931706@qq.com>
@ti-chi-bot
Copy link
Member

[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 /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Mar 17, 2022
@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #4743 (e5dc99d) into master (950b363) will increase coverage by 0.04%.
The diff coverage is 0.00%.

@@            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              
Flag Coverage Δ
unittests 75.04% <0.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/core/region.go 91.40% <0.00%> (-0.19%) ⬇️
server/core/region_option.go 80.95% <0.00%> (-1.58%) ⬇️
server/region_syncer/client.go 83.59% <0.00%> (-1.57%) ⬇️
server/schedule/operator/step.go 74.07% <0.00%> (-1.02%) ⬇️
server/cluster/cluster.go 83.52% <0.00%> (-0.52%) ⬇️
server/schedulers/hot_region.go 83.08% <0.00%> (-0.31%) ⬇️
client/client.go 68.72% <0.00%> (-0.11%) ⬇️
pkg/tempurl/tempurl.go 60.00% <0.00%> (ø)
server/schedulers/balance_leader.go 92.36% <0.00%> (+0.06%) ⬆️
server/server.go 75.07% <0.00%> (+0.15%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 950b363...e5dc99d. Read the comment docs.

@@ -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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will it happen?

Copy link
Contributor Author

@bufferflies bufferflies Mar 17, 2022

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.

Copy link
Member

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>
@ti-chi-bot
Copy link
Member

[FORMAT CHECKER NOTIFICATION]

Notice: Please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123 or Issue Number: ref #456, multiple issues should use full syntax for each issue and be separated by a comma, like: Issue Number: close #123, ref #456.

📖 For more info, you can check the "Linking issues" section in the CONTRIBUTING.md.

@bufferflies
Copy link
Contributor Author

/close see #4670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants