-
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
restore: precheck cluster is empty when first time full restore #45014
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9b0e625
restore: precheck cluster is empty when first time full restore
3pointer f5174bc
fix
3pointer 7aa85eb
fix
3pointer 1b30b59
fix
3pointer e314676
fix
3pointer 5764d1a
fix
3pointer 82d3fc4
fix br_full_cluster_restore test
3pointer 5eca90d
change log level
3pointer 5fe22b3
update
3pointer f0af66c
Merge branch 'master' into precheck_cluster
3pointer 33553e4
update
3pointer 8563539
Merge branch 'master' into precheck_cluster
3pointer 1393024
update
3pointer ddc5123
update comment
3pointer 1bd7abe
Merge branch 'master' into precheck_cluster
3pointer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 will make BR fail once there are any table in the cluster. (Even there isn't intersection of them and the backup archive.) Will this break some use cases?
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.
Yes, It's intended @benmaoer has confirmed it. so this behaviour will introduced in v7.3. and won't cherry-pick back to any release versions.
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.
Yes, there are 2 options:
When restoring the entire cluster from a full backup, it is necessary to check whether the target cluster is an empty cluster, which has no user tables.
When restoring specific tables or databases from the backup, it is necessary to detect if there are any conflicts between the tables to be restored and the existing tables in the target cluster. If conflicts are found, an error should be reported in advance to avoid data integrity issues.
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.
Sometimes
br restore full
don't mean I realy want to resotre the entire cluster. In certain scenarios, I just want to restore multiple tables, but they are distributed across different databases. But neitherbr restore table
norbr restore db
supports regular expressions.So, can you add a
--force
option to skip this check??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 maybe we should skip the check if user has specified
--filter
argument already. @benmaoer @YuJuncen WDYT?