-
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: incremental restore does not handle CREATE INDEX (ADD INDEX) correctly, causing data inconsistency #54426
Comments
If we use
Here,
The bug is that the Cluster TS obtained by Incremental restore Line 827 in b4052bd
is computed way too early before DDL execution at Line 986 in b4052bd
so the RewriteTS operation failed to overwrite the keys generated by CREATE INDEX. The (Alternatively, we can modify the DDL execution such that it will never change any |
I'm not sure what's the timeline of these actions. Should it be invoking |
@lance6716 the current situation is
The correct action should be:
Alternatively, ensure DDLs won't generate any
But if we do want to keep rewriteTS it should use 61 rather than 51 to maintain the global chronological order. If we disable rewriteTS, it is better we find a way to also force ExecDDL to commit the DDLJobs using the "backup time axis" rather than "restore time axis", so that |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
In step 5, the
admin check table
passes and theselect *
has the same output as step 2.3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: