-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.report/customerCustomers have encountered this bug.Customers have encountered this bug.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
set global tidb_ddl_enable_fast_reorg = on; -- turn off dxf after 8.5 at the same time
And add index with workload, the workload is updating the column related to the index col frequently. In the merge temp index stage, there will be los of write conflict
in log. And after the ddl job reach the maximum retry count, ddl job will faild.
CREATE TABLE `t` (
`a` varchar(64) NOT NULL ,
`b` varchar(64) NOT NULL ,
`c` varchar(64) DEFAULT NULL,
`d` bigint(20) NOT NULL,
`e` int(11) NOT NULL,
`f` bigint(20) NOT NULL,
`g` varchar(128) NOT NULL,
`h` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`i` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`a`,`b`)
);
alter table t add index(b, f);
-- workload like this
INSERT INTO
`t` (
`a`,
`b`,
`c`,
`d`,
`e`,
`f`,
`g`
)
VALUES
(...) ON DUPLICATE KEY
UPDATE
`a` = VALUES (`a`),
`b` = VALUES (`b`),
`c` = VALUES (`c`),
`d` = VALUES(`d`),
`e` = VALUES(`e`),
`f` = VALUES (`f`),
`g` = VALUES (`g`);
2. What did you expect to see? (Required)
Add index success
3. What did you see instead (Required)
Add index reatch the max error limit and failed.
Execute: Write conflict, txnStartTS=458282835105808427, conflictStartTS=458282835118915588, conflictCommitTS=0, key=????, reason=Optimistic [try again later].
4. What is your TiDB version? (Required)
v7.5.6
Metadata
Metadata
Assignees
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.report/customerCustomers have encountered this bug.Customers have encountered this bug.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.