-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.feature/developingthe related feature is in developmentthe related feature is in developmentseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- deploy a cluster and create partition table
- add index with txn mode
- upgrade the cluster
- show ddl job info to check the rowcount
2. What did you expect to see? (Required)
3. What did you see instead (Required)
- rowcount may be smaller than the previous view
MySQL [(none)]> 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 |
+--------+---------+----------------------+----------------------------------+----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+---------+
| 224 | rtdb | t | add index /* txn */ | write reorganization | 88 | 154 | 898319 | 2023-05-22 11:07:47 |
MySQL [(none)]> 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 |
+--------+---------+----------------------+----------------------------------+----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+---------+
| 224 | rtdb | t | add index /* txn */ | write reorganization | 88 | 154 | 728796 | 2023-05-22 11:07:47 | 2023-05-22 11:07:47 | NULL | running |
MySQL [(none)]> 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 |
+--------+---------+----------------------+----------------------------------+----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+---------+
| 224 | rtdb | t | add index /* txn */ | write reorganization | 88 | 154 | 806927 | 2023-05-22 11:07:47 | 2023-05-22 11:07:47 | NULL | running |
MySQL [(none)]> 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 |
+--------+---------+----------------------+----------------------------------+----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+---------+
| 224 | rtdb | t | add index /* txn */ | write reorganization | 88 | 154 | 867855 | 2023-05-22 11:07:47 | 2023-05-22 11:07:47 | NULL | running |
MySQL [(none)]> 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 |
+--------+---------+----------------------+----------------------------------+----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+---------+
| 224 | rtdb | t | add index /* txn */ | write reorganization | 88 | 154 | 672906 | 2023-05-22 11:07:47 | 2023-05-22 11:07:47 | NULL | running |
- after index is added, the rowcount is different with actually row count.
MySQL [rtdb]> select count(1) from t;
+----------+
| count(1) |
+----------+
| 10000800 |
+----------+
MySQL [(none)]> admin show ddl jobs 50;
+--------+---------+------------------------------------------+----------------------------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
| JOB_ID | DB_NAME | TABLE_NAME | JOB_TYPE | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME | START_TIME | END_TIME | STATE |
+--------+---------+------------------------------------------+----------------------------------+--------------+-----------+----------+-----------+---------------------+---------------------+---------------------+--------+
| 224 | rtdb | t | add index /* txn */ | public | 88 | 154 | 613382 | 2023-05-22 11:07:47 | 2023-05-22 11:07:47 | 2023-05-22 11:30:58 | synced |4. What is your TiDB version? (Required)
55bac2963911af0fbd506f776a33e1d2337c7843
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.feature/developingthe related feature is in developmentthe related feature is in developmentseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.