-
Notifications
You must be signed in to change notification settings - Fork 720
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
server: use old interface for scatter region #4766
Conversation
Signed-off-by: nolouch <nolouch@gmail.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
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 #4766 +/- ##
==========================================
+ Coverage 75.09% 75.16% +0.06%
==========================================
Files 294 294
Lines 28325 28325
==========================================
+ Hits 21271 21290 +19
+ Misses 5174 5151 -23
- Partials 1880 1884 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -1204,7 +1204,7 @@ func (s *GrpcServer) ScatterRegion(ctx context.Context, request *pdpb.ScatterReg | |||
}, nil | |||
} | |||
|
|||
region := rc.GetRegion(request.GetRegion().GetId()) | |||
region := rc.GetRegion(request.GetRegionId()) |
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 think we should support both fields and completely remove the deprecated one in a future release.
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 new field is RegionsId
, then regionID
deprecated in pingcap/kvproto#686. Both regionID
and regionsID
are supported. here is incorrectly use Region
field.
server/grpc_service.go
Outdated
region := rc.GetRegion(request.GetRegion().GetId()) | ||
// TODO: Deprecate it use `request.GetRegionsID`. | ||
//nolint | ||
region := rc.GetRegion(request.GetRegionId()) | ||
if region == nil { | ||
if request.GetRegion() == nil { | ||
return nil, errors.Errorf("region %d not found", request.GetRegion().GetId()) |
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 should also be changed back? ref: https://github.com/tikv/pd/pull/4582/files#diff-eb404b45d0a569b05f58f4e4bf2b42b32150be75ec2ed72f86330c4b5d739eabL1194
Signed-off-by: nolouch <nolouch@gmail.com>
/merge |
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 84bf9b6
|
In response to a cherrypick label: new pull request created: #4767. |
Signed-off-by: nolouch nolouch@gmail.com
What problem does this PR solve?
Issue Number: Close #4763
What is changed and how it works?
Check List
Tests
Release note