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

DM may get "Duplicate partition" Error when upstream MySQL ADD Partition for partition table #3854

Closed
Lawrence1223free opened this issue Dec 13, 2021 · 2 comments
Assignees
Labels
area/dm Issues or PRs related to DM. severity/major type/bug The issue is confirmed as a bug.

Comments

@Lawrence1223free
Copy link

  1. Minimal reproduce step (Required)

-------------------- from the DM worker log --------------------
[2021/12/13 09:49:38.653 +08:00] [ERROR] [baseconn.go:184] ["execute statement failed"] [task=task_XXX_replication] [unit="binlog replication"] [query="ALTER TABLE XXX.XXXXX_XXXXX_XXXXX ADD PARTITION (PARTITION p20220111 VALUES LESS THAN (_UTF8MB4'2022-01-12'))"] [argument="[]"] [error="invalid connection"]
[2021/12/13 09:49:38.653 +08:00] [ERROR] [baseconn.go:191] ["rollback failed"] [task=task_sbk_replication] [unit="binlog replication"] [query="ALTER TABLE XXX.XXXXX_XXXXX_XXXXX ADD PARTITION (PARTITION p20220111 VALUES LESS THAN (_UTF8MB4'2022-01-12'))"] [argument="[]"] [error="invalid connection"]
[2021/12/13 09:49:38.653 +08:00] [ERROR] [db.go:201] ["execute statements failed after retry"] [task=task_sbk_replication] [unit="binlog replication"] [queries="[ALTER TABLE XXX.XXXXX_XXXXX_XXXXX ADD PARTITION (PARTITION p20220111 VALUES LESS THAN (_UTF8MB4'2022-01-12'))]"] [arguments="[]"] [error="[code=10006:class=database:scope=not-set:level=high], Message: execute statement failed: ALTER TABLE XXX.XXXXX_XXXXX_XXXXX ADD PARTITION (PARTITION p20220111 VALUES LESS THAN (_UTF8MB4'2022-01-12')), RawCause: invalid connection"]

-------------------- After 1 mius, DM added partition again --------------------
[2021/12/13 09:50:42.275 +08:00] [ERROR] [baseconn.go:184] ["execute statement failed"] [task=task_sbk_replication] [unit="binlog replication"] [query="ALTER TABLE XXX.XXXXX_XXXXX_XXXXX ADD PARTITION (PARTITION p20220111 VALUES LESS THAN (_UTF8MB4'2022-01-12'))"] [argument="[]"] [error="Error 1517: Duplicate partition name p20220111"]

  1. What did you expect to see? (Required)
    DM can handle this error, that means, if partition is already created, just skip but not throws error

  2. What is your TiDB version? (Required)
    TiDB: V5.3.0
    DM: V2.0,7

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

@lance6716
Copy link
Contributor

closed by #3995, please wait v5.3.1 or v5.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants