pingcap / pingcap/tidb

add index task error after kill ddl owner

Open
#63,398 1 comment 0 reactions 1 assignee Claimed by @CbcWestwolf View on GitHub
component/ddl component/DXF contribution may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)
1、tidb_enable_dist_task='on' and local sort
2、run sysbench read write
3、add index for one table
4、kill ddl owner

operator logs:
`[2025-09-05 00:26:41] ###### start adding index
ALTER TABLE `sbtest1` ADD INDEX `index_test_1757003201670`(`c`)
[2025-09-05 00:26:41] ###### wait for ddl job finish
[2025-09-05 01:27:02] ###### wait for ddl job finish timeout(1h0m0s)
select job_id, db_name, table_name, job_type, create_time, start_time, end_time, state, query from information_schema.ddl_jobs where query = 'ALTER TABLE `sbtest1` ADD INDEX `index_test_1757003201670`(`c`)'
jobId: 374, job type: add index, state: running, comments: ingest, DXF, max_node_count=3"`

tidb logs:
[tidb-2025-09-05T03-23-13.630.log.zip](https://github.com/user-attachments/files/22200533/tidb-2025-09-05T03-23-13.630.log.zip)
[tidb-0.log.zip](https://github.com/user-attachments/files/22200538/tidb-0.log.zip)

### 2. What did you expect to see? (Required)
add index can succeed

### 3. What did you see instead (Required)
add index task error and add index can not succeed

![Image](https://github.com/user-attachments/assets/0bf4eee1-8ce4-48cd-887e-3030ec2e2797)

### 4. What is your TiDB version? (Required)
./tidb-server -V
Release Version: v9.0.0-beta.2.pre-444-ga0f581f
Edition: Community
Git Commit Hash: a0f581f9feb12f428179aceaa19fccb3d47a2a05
Git Branch: HEAD
UTC Build Time: 2025-09-04 12:05:52
GoVersion: go1.23.12
Race Enabled: false
Check Table Before Drop: false
Store: unistore
Kernel Type: Classic
2025-09-04T23:43:07.578+0800

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.