-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
restore: shift rewrite ranges before split ranges #51653
Conversation
Skipping CI for Draft Pull Request. |
Hi @3pointer. 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/test-infra repository. |
/test all |
@3pointer: 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/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51653 +/- ##
================================================
+ Coverage 70.6982% 72.8909% +2.1927%
================================================
Files 1472 1473 +1
Lines 437001 441023 +4022
================================================
+ Hits 308952 321466 +12514
+ Misses 108653 99434 -9219
- Partials 19396 20123 +727
Flags with carried forward coverage won't be shown. Click here to find out more.
|
br/pkg/restore/merge.go
Outdated
@@ -35,7 +40,10 @@ type MergeRangesStat struct { | |||
// By merging small ranges, it speeds up restoring a backup that contains many | |||
// small ranges (regions) as it reduces split region and scatter region. | |||
func MergeFileRanges( |
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 is strange that MergeFileRanges
rewrites the key. Maybe rename it to MergeAndRewriteFileRanges
.
@@ -82,7 +81,7 @@ func (rs *RegionSplitter) ExecuteSplit( | |||
|
|||
// Sort the range for getting the min and max key of the ranges | |||
// TODO: this sort may not needed if we sort tables after creatation outside. | |||
sortedRanges, errSplit := SortRanges(ranges, rewriteRules) | |||
sortedRanges, errSplit := SortRanges(ranges) |
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 have the structure before:
map [new table id] ranges
Now it is flatten to []ranges.
Actually, we can sort by new table id
instead of range's key
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.
maybe it has no performance issue.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Leavrth, YuJuncen The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test check-dev2 |
@3pointer: 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/test-infra repository. |
What problem does this PR solve?
Issue Number: close #51685
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.