Skip to content
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

ddl: fast reorg of index may cause duplicate entry error #49233

Open
AilinKid opened this issue Dec 6, 2023 · 4 comments
Open

ddl: fast reorg of index may cause duplicate entry error #49233

AilinKid opened this issue Dec 6, 2023 · 4 comments
Assignees
Labels
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. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@AilinKid
Copy link
Contributor

AilinKid commented Dec 6, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

image
image
image

2. What did you expect to see? (Required)

Look, we did add a unique index with ddl job id as 1131, while at 02.19 ddl owner has changed, and resume the checkpoint at same time, consequently leading duplicate entry error at 02.21

3. What did you see instead (Required)

no duplicate error (since user has checked with their data)

4. What is your TiDB version? (Required)

master, 7.1.1

@AilinKid AilinKid added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra labels Dec 6, 2023
@bb7133 bb7133 added component/ddl This issue is related to DDL of TiDB. and removed sig/sql-infra SIG: SQL Infra labels Dec 6, 2023
@tangenta tangenta self-assigned this Dec 7, 2023
@ti-chi-bot ti-chi-bot added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Apr 9, 2024
@lance6716 lance6716 added 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. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 labels Apr 29, 2024
@lance6716 lance6716 removed the affects-6.5 This bug affects the 6.5.x(LTS) versions. label Apr 29, 2024
@lance6716
Copy link
Contributor

Same type of root cause like #46986

@lance6716
Copy link
Contributor

after #52993 , there are still 2 cases can trigger the false alert of "duplicate entry"

  • non distributed execution framework: due to concurrency DDL worker and low watermark checkpoint, some data will be imported twice with different TS when DDL owner changes
  • distributed execution framework with local sort: there's no checkpoint manager so TS is allocated when needed and does not persist

cc @tangenta

@kennedy8312
Copy link

Are there any pending tasks for this issue? Shall we close this one?

@lance6716
Copy link
Contributor

Are there any pending tasks for this issue? Shall we close this one?

It's still not totally fixed, I have listed 2 cases in above comments. It's hard to fix, maybe we can fix it in v8.3

terry1purcell pushed a commit to terry1purcell/tidb that referenced this issue May 17, 2024
RidRisR pushed a commit to RidRisR/tidb that referenced this issue May 23, 2024
@ti-chi-bot ti-chi-bot added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

7 participants