Skip to content

Row count maybe inaccurate when adding index with DXF #56942

@tangenta

Description

@tangenta

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Add indexes on tables with 10k rows.

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

All adding index jobs row count should be 10000.

3. What did you see instead (Required)

mysql> admin show ddl jobs;
+--------+---------+------------+------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+
| JOB_ID | DB_NAME | TABLE_NAME | JOB_TYPE               | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME                | START_TIME                 | END_TIME                   | STATE  |
+--------+---------+------------+------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+
|    596 | test    | sbtest27   | add index /* ingest */ | public       |       195 |      257 |     10000 | 2024-10-29 05:38:35.684000 | 2024-10-29 05:40:26.534000 | 2024-10-29 05:40:28.433000 | synced |
|    595 | test    | sbtest4    | add index /* ingest */ | public       |       195 |      203 |     10000 | 2024-10-29 05:38:35.684000 | 2024-10-29 05:40:26.334000 | 2024-10-29 05:40:30.034000 | synced |
|    594 | test    | sbtest99   | add index /* ingest */ | public       |       195 |      440 |     10000 | 2024-10-29 05:38:35.684000 | 2024-10-29 05:40:24.584000 | 2024-10-29 05:40:26.484000 | synced |
|    593 | test    | sbtest81   | add index /* ingest */ | public       |       195 |      470 |     10000 | 2024-10-29 05:38:35.684000 | 2024-10-29 05:40:24.334000 | 2024-10-29 05:40:26.283000 | synced |
|    592 | test    | sbtest47   | add index /* ingest */ | public       |       195 |      313 |         0 | 2024-10-29 05:38:35.633000 | 2024-10-29 05:40:22.684000 | 2024-10-29 05:40:24.584000 | synced |
|    591 | test    | sbtest91   | add index /* ingest */ | public       |       195 |      422 |     10000 | 2024-10-29 05:38:35.633000 | 2024-10-29 05:40:22.434000 | 2024-10-29 05:40:24.334000 | synced |
|    590 | test    | sbtest85   | add index /* ingest */ | public       |       195 |      476 |         0 | 2024-10-29 05:38:35.584000 | 2024-10-29 05:40:20.683000 | 2024-10-29 05:40:22.634000 | synced |
|    589 | test    | sbtest97   | add index /* ingest */ | public       |       195 |      494 |     10000 | 2024-10-29 05:38:35.584000 | 2024-10-29 05:40:20.483000 | 2024-10-29 05:40:22.434000 | synced |
|    588 | test    | sbtest28   | add index /* ingest */ | public       |       195 |      259 |     10000 | 2024-10-29 05:38:35.584000 | 2024-10-29 05:40:16.933000 | 2024-10-29 05:40:20.683000 | synced |
|    587 | test    | sbtest9    | add index /* ingest */ | public       |       195 |      235 |     10000 | 2024-10-29 05:38:35.484000 | 2024-10-29 05:40:16.734000 | 2024-10-29 05:40:20.483000 | synced |
+--------+---------+------------+------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+
[2024/10/29 05:40:24.552 +00:00] [WARN] [index.go:2684] ["cannot get task"] [category=ddl] [task_key=ddl/backfill/592] [error="task not found"]

4. What is your TiDB version? (Required)

c550aae

Metadata

Metadata

Assignees

Labels

affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.4affects-8.5This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.severity/moderatetype/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