-
Notifications
You must be signed in to change notification settings - Fork 409
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
ddl: Support FLASHBACK DATABASE
#8424
Merged
ti-chi-bot
merged 12 commits into
pingcap:master
from
JaySon-Huang:support_flashback_database
Dec 7, 2023
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
21e59f2
Support FLASHBACK DATABASE ...
JaySon-Huang e2ef50c
Add more test case about partition table
JaySon-Huang 8be7640
Remove useless changes
JaySon-Huang 35608e8
Unify the naming
JaySon-Huang 776fdf4
Add test case
JaySon-Huang 6383e4c
Add hint
JaySon-Huang 1ae4f54
Merge remote-tracking branch 'upstream/master' into support_flashback…
JaySon-Huang 94d4ebc
Format files
JaySon-Huang 481b236
Fix typo
JaySon-Huang 6ceeb01
Refine log level
JaySon-Huang 221708d
Add tombstone timestamp to logging
JaySon-Huang 48ea185
Merge branch 'master' into support_flashback_database
ti-chi-bot[bot] 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
Oops, something went wrong.
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.
If the db is not existed now, do we need to create the db and related tables based on it's db info?
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 a little worried about this scenario: the customer is stuck in the gc time to do the flash back, and tiflash may receive and process it later, which may be just longer than tiflash's local gc, so the db and tables still don't exist.
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.
IDatabase
andIStorage
are allocated by tiflash when it receives theDROP DATABASE
orDROP TABLE
DDL. So the tombstone_ts are usually sliently larger than the user actually executed those DROP statements. When a user executeFLASHBACK DATABASE
, thoseIDatabase
andIStorage
instance are possible not pass the gc safepoint.IStorage
andIDatabase
instance are actually get physically dropped in TiFlash instance, it is dangerous to "create" them when applying "FLASHBACK DATABASE". Because there are some rows is permanently deleted from tiflash instance. If we silently "create" them, it means the error is hard to find out but data inconsistency happens. An explicit error is better than implicit data loss.