Skip to content

data inconsistency in table after kill pd leader during adding index #59701

@Lily2025

Description

@Lily2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1、enable tidb_enable_dist_task and global sort
2、run sysbench
3、add index for one table
4、kill pd leader

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

admin check success

3. What did you see instead (Required)

admin check failed
data inconsistency in table: sbtest2, index: index_test_1740259129016, handle: 37480194, index-values:"" != record-values:"handle: 37480194, values: [KindString 12789685643-64
577169320-18715872406-73821408681-48829052116-26062083313-11277804280-59971535651-34848965584-44255881774]")

operatorLogs:
[2025-02-23 05:18:49] ###### start adding index
ALTER TABLE sbtest2 ADD INDEX index_test_1740259129016(c)
[2025-02-23 05:18:49] ###### wait for ddl job finish
[2025-02-23 05:24:19] ###### ddl job finished
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 sbtest2 ADD INDEX index_test_1740259129016(c)'
jobId: 425, job type: add index, state: synced, comments: ingest, DXF, cloud, max_node_count=3
add index done, it takes: 5m30.58627409s
[2025-02-23 05:24:19] ###### start admin check
admin check index sysbench_64_7000w.sbtest2 index_test_1740259129016

4. What is your TiDB version? (Required)

./tidb-server -V
Release Version: v9.0.0-alpha-307-g6c0159e
Edition: Community
Git Commit Hash: 6c0159e
Git Branch: HEAD
UTC Build Time: 2025-02-21 10:53:12
GoVersion: go1.23.6
Race Enabled: false
Check Table Before Drop: false
Store: unistore
2025-02-23T05:11:27.172+0800

Metadata

Metadata

Assignees

Labels

affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.impact/inconsistencyincorrect/inconsistency/inconsistentseverity/criticaltype/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