Duplicate entry when insert into a recovered table with auto_id_cache=1 #52680
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
the reason is we drop the
IID
key whendrop table
, but didn't recover it whenrecover table
tidb/pkg/ddl/table.go
Line 563 in b4c8749
also when
drop table
we didn't invalid the cached id in autoid_service, when this tidb shutdown it will force rebase the id of the droped table, and cause meta inconsistenttidb/pkg/autoid_service/autoid.go
Line 385 in b4c8749
2. What did you expect to see? (Required)
success
3. What did you see instead (Required)
fail
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: