-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
br: revert new introduced BatchScanRegions
to keep compatibility
#54365
Conversation
Signed-off-by: you06 <[email protected]>
Hi @you06. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
BatchScanRegions
to keep compabilityBatchScanRegions
to keep compatibility
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54365 +/- ##
=================================================
- Coverage 72.8081% 56.5109% -16.2972%
=================================================
Files 1527 1679 +152
Lines 435913 622548 +186635
=================================================
+ Hits 317380 351808 +34428
- Misses 98884 246385 +147501
- Partials 19649 24355 +4706
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@you06: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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 kubernetes-sigs/prow repository. |
Signed-off-by: you06 <[email protected]>
@@ -63,7 +63,8 @@ func (c *codecPDClient) ScanRegions( | |||
endKey = codec.EncodeBytes(nil, endKey) | |||
} | |||
|
|||
regions, err := c.Client.BatchScanRegions(ctx, []pd.KeyRange{{StartKey: startKey, EndKey: endKey}}, limit, opts...) | |||
//nolint:staticcheck | |||
regions, err := c.Client.ScanRegions(ctx, startKey, endKey, limit, opts...) |
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.
those can be removed if we have do it in pd client-go
?
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.
Sorry I don't get your mean, I just revert it to the old version.
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 if we have make interface compatible in client-go
side, we can still use BatchScanRegions
here
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.
It's a little weird that pd's client handle unimplement error, and the compatibility is made out of pd client. So I switch back to old interface here.
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
/retest |
@you06: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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 kubernetes-sigs/prow repository. |
/ok-to-test |
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #54313 #54341
Problem Summary:
What changed and how does it work?
We have deprecated the
ScanRegion
and introduceBatchScanRegions
as a replacement in v8.2. However, to keep compatibility(v8.2 br/lightning should work with previous TiDB clusters), the tools should keep using the old supportedScanRegion
.Check List
Tests
The integration test case which import into 8.1 tidb with this PR's lightning is passed.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.