-
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
Duplicate entry when using BR to restore a NONCLUSTERED AUTO_ID_CACHE=1 table #46093
Comments
cc #44716. |
PTAL @tiancaiamao |
OK, I find the root cause is that in the NONCLUSTERED case, we have both tidb_rowid and auto_inc_id to be recovered. But the Before #39041, After we seperate the meta key, the both need their own field in
|
Hi, the same problem happens even with CLUSTERED primary key. Version is 7.1.1.
|
…RED AUTO_ID_CACHE=1 table (pingcap#46127) close pingcap#46093
Could you please take a look @kennytm @tiancaiamao ? Thanks! |
With CLUSTERED, the AUTO_INCREMENT is recorded, this bug does not affect that scene. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
(explained below)
3. What did you see instead (Required)
show table t next_row_id; -- _TIDB_ROWID = 1, AUTO_INCREMENT = 4001
_tidb_rowid
_tidb_rowid
increases to the available zone, we see the primary key's auto-inc values have a gap4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: