-
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: add resotre auto inc id for incremental restore #29021
restore: add resotre auto inc id for incremental restore #29021
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-integration-br-test |
1 similar comment
/run-integration-br-test |
please add a test |
Actually we had an integration test |
/run-integration-br-test |
/run-integration-br-test |
/run-integration-br-test |
1 similar comment
/run-integration-br-test |
3bf9597
to
9aac1db
Compare
/run-integration-br-test |
/run-integration-br-test |
/run-integration-br-test |
/run-integration-br-test |
1 similar comment
/run-integration-br-test |
0416bba
to
0e3f669
Compare
/run-integration-br-test |
/run-integration-br-test |
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
@@ -406,11 +406,12 @@ func (rc *Client) createTable( | |||
dom *domain.Domain, | |||
table *metautil.Table, | |||
newTS uint64, | |||
ddlTables map[UniqueTableName]bool, |
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.
Can the value be struct{}
instead of bool?
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 change it to struct{} then next statement in switch...case
should change. https://github.com/pingcap/tidb/pull/29021/files#diff-6aa3f356317f5e47c13ad7dd73465a1cf4a550052819ffe40448e545bf857bf5R171
I think bool is better.
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 1b2d157
|
/run-check_dev_2 |
1 similar comment
/run-check_dev_2 |
@3pointer: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Problem Summary:
After #27199 merged. The incremental restore will lost the correct auto increment id cache. Because, we will create table twice during incremental restoration. since we cannot use OnExistReplace option on createTable. so we execute the first create table DDL will lost the real auto id cache during incremental restoration.
What is changed and how it works?
This PR bring the old logic back. even we only can restore create table DDL at first time. but we can execute alter auto id SQL to set the correct auto id cache.
Check List
Tests
Release note