You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rebase auto increment not executed after second restore #60804
In the restore process, if the first restore fails but leaves partial table structures in the cluster, and the second restore uses OnExistIgnore, those pre-existing tables will be skipped.
As a result, row_id rebase is not executed for these tables, leading to incorrect auto-increment behavior.
The root cause is that batchCreateTables is not atomic.
suppose we are creating 2 tables using batchCreateTables, we create the metakv of first table success on owner, but the second table already exists, we will mark the whole job as cancelled
batch create tables is added before 6.1
/label affects-8.5
/label affects-8.1
/label affects-7.5
/label affects-7.1
/label affects-6.5
/label affects-6.1
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.
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.
Activity
D3Hunter commentedon May 8, 2025
suppose we are creating 2 tables using batchCreateTables, we create the metakv of first table success on owner, but the second table already exists, we will mark the whole job as
cancelledtidb/pkg/ddl/create_table.go
Lines 80 to 86 in f030b63
and then we commit the transaction, so metakv of the first table is commited
tidb/pkg/ddl/job_worker.go
Lines 622 to 626 in f030b63
then on executor part, we return directly, without running
createTableWithInfoPostfor any tabletidb/pkg/ddl/executor.go
Lines 1303 to 1317 in f030b63
joechenrh commentedon Jul 18, 2025
batch create tables is added before 6.1
/label affects-8.5
/label affects-8.1
/label affects-7.5
/label affects-7.1
/label affects-6.5
/label affects-6.1
5 remaining items
ti-chi-bot commentedon Jul 18, 2025
@joechenrh: The label(s)
affects-6.1cannot be applied. These labels are supported:fuzz/sqlancer, fuzz/comp, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, needs-cherry-pick-release-8.1, needs-cherry-pick-release-8.5, needs-cherry-pick-release-9.0-beta.2, affects-6.5, affects-7.1, affects-7.5, affects-8.1, affects-8.5, affects-9.0, may-affects-6.5, may-affects-7.1, may-affects-7.5, may-affects-8.1, may-affects-8.5.Details
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 ti-community-infra/tichi repository.
joechenrh commentedon Jul 18, 2025
/remove-label may-affects-6.1
ti-chi-bot commentedon Jul 18, 2025
@joechenrh: The label(s)
may-affects-6.1cannot be applied. These labels are supported:fuzz/sqlancer, fuzz/comp, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, needs-cherry-pick-release-8.1, needs-cherry-pick-release-8.5, needs-cherry-pick-release-9.0-beta.2, affects-6.5, affects-7.1, affects-7.5, affects-8.1, affects-8.5, affects-9.0, may-affects-6.5, may-affects-7.1, may-affects-7.5, may-affects-8.1, may-affects-8.5.Details
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 ti-community-infra/tichi repository.
ddl: move auto id handling from submitter to executor (pingcap#62449)
ddl: move auto id handling from submitter to executor (pingcap#62449)
ddl: add auto ID rebase create table submitted by BR (#64356)
ddl: move auto id handling from submitter to executor (pingcap#62449)
ddl: move auto id handling from submitter to executor (#62449) (#64761)
ddl: add auto ID rebase create table submitted by BR (pingcap#64356)
ddl: add auto ID rebase create table submitted by BR (#64356) (#64762)