Skip to content

add index rollback when tidb rolling restart #52805

@Lily2025

Description

@Lily2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1、with tidb_enable_dist_task='off'
2、run sysbench
3、add index for one of table
4、tidb rolling restart

logs:
tidb-0.tar.gz
tidb-1.tar.gz

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

add index can success

3. What did you see instead (Required)

add index rollback when tidb rolling restart

the status of ddl job is not synced or done or running or queueing (now: 2024-04-20 07:12:03, jobId: 586, job type: add index /* ingest /, state: rollback done)
operatorLogs:
[2024-04-20 07:08:32] ###### start adding index
ALTER TABLE sbtest1 ADD INDEX index_test_1713568112880(c)
[2024-04-20 07:08:32] ###### wait for ddl job finish
[2024-04-20 07:12:03] ###### wait for ddl job to finish failed
select job_id, job_type, state from information_schema.ddl_jobs where query = 'ALTER TABLE sbtest1 ADD INDEX index_test_1713568112880(c)'
jobId: 586, job type: add index /
ingest */, state: rollback done

4. What is your TiDB version? (Required)

./tidb-server -V
Release Version: v7.1.5
Edition: Community
Git Commit Hash: f4faa50
Git Branch: HEAD
UTC Build Time: 2024-04-19 10:49:04
GoVersion: go1.20.10
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
2024-04-20T07:08:24.815+0800

Metadata

Metadata

Assignees

Labels

affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions