-
Notifications
You must be signed in to change notification settings - Fork 5.9k
br: compatibility of log backup and log restore #61238
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
base: master
Are you sure you want to change the base?
br: compatibility of log backup and log restore #61238
Conversation
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
Hi @Leavrth. 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #61238 +/- ##
================================================
+ Coverage 73.1657% 74.8684% +1.7026%
================================================
Files 1725 1726 +1
Lines 477926 482337 +4411
================================================
+ Hits 349678 361118 +11440
+ Misses 106834 98996 -7838
- Partials 21414 22223 +809
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/retest |
@BornChanger: 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. |
restoreErr = err | ||
return | ||
} | ||
tableIds := make([]int64, 0, len(cfg.PiTRTableTracker.TableIdToDBIds)) |
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 PiTRtableTracker might be nil if this is not a pitr restore, does the check logTaskBackend == nil
guarantee this is a PiTR?
Signed-off-by: Jianjun Liao <[email protected]>
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.
rest LGTM
if parsed { | ||
if filterOutFn(restoreCommitTs, snapshotBackupTs) { | ||
return nil | ||
} | ||
} | ||
filenames = append(filenames, path) |
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.
if not parsed, why still need append this file?
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'm worried that some external storage make the filename dirty.
if err != nil { | ||
return errors.Trace(err) | ||
} | ||
if filterOutFn(restoreCommitTs, snapshotBackupTs) { |
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 seems a little bit duplicated?
return errors.Errorf( | ||
"cannot restore the table(Id=%d) because it is restored(at %d) before snapshot backup(at %d). "+ | ||
"Please respecify the filter that does not contain the table or replace with a newer snapshot backup.", | ||
tableId, restoreCommitTs, startTs) |
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 better to record more table info(like table name), do we have chance to make this log more easy to debug?
return | ||
} | ||
tableIds := make([]int64, 0, len(cfg.PiTRTableTracker.TableIdToDBIds)) | ||
for tableId := range cfg.PiTRTableTracker.TableIdToDBIds { |
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.
should we handle PartitionIds 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.
to handle the exchange partition ddl. Maybe it is now a partition in this PITR restore.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3pointer 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 |
[LGTM Timeline notifier]Timeline:
|
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
@Leavrth: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #61237
Problem Summary:
compatibility of log backup and log restore
What changed and how does it work?
PITR can restore on the cluster running log backup, and these restored tables can not be restored until there is a full backup later.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.