row_count of add index job is not equal to the actual number
- 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)
```
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 |
+--------+---------+------------+-------------------------------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
| 110 | big | items | alter table multi-schema change | none | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 10:22:42 | 2023-06-14 11:28:51 | synced |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 45000771 | 2023-06-14 10:22:42 | 2023-06-14 10:22:42 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:43 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:45 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:45 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:46 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:47 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:48 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:49 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:49 | 2023-06-14 11:28:51 | done |
| 110 | big | items | add index /* subjob */ /* ingest */ | public | 96 | 98 | 0 | 2023-06-14 10:22:42 | 2023-06-14 11:28:50 | 2023-06-14 11:28:51 | done |
```
actual row number
```
mysql> select count(*) from items;
+----------+
| count(*) |
+----------+
| 45000000 |
+----------+
1 row in set (7.31 sec)
```
### 2. What did you expect to see? (Required)
row count from add index and count(*) should be same
### 3. What did you see instead (Required)
in add index job, it equal to 45000771
### 4. What is your TiDB version? (Required)
master
Contributor guide
Assessment
This issue has not been assessed yet.