pingcap / pingcap/tidb

"show import jobs" query result display order should not according to id

Open
#44,910 1 comment 0 reactions 0 assignees View on GitHub
type/feature-request
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> show import jobs;
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+----------+-----------+-----------+------------------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+----------------------------+----------------------------+------------+
| Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+----------+-----------+-----------+------------------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+----------------------------+----------------------------+------------+
| 1 | s3://nfs/tools_test_data/t_o_shard_clustered/*.csv?access-key=xxxxxx&endpoint=http%3A%2F%2Fminio.pingcap.net%3A9001&force-path-style=true&secret-access-key=xxxxxx | `H`.`t_o_shard` | 98 | importing | cancelled | 1.073TB | NULL | cancelled by user | 2023-06-18 13:21:37.524458 | 2023-06-18 13:21:37.757355 | NULL | root@% |
| 2 | s3://nfs/tools_test_data/t_o_shard_clustered/*.csv?access-key=xxxxxx&endpoint=http%3A%2F%2Fminio.pingcap.net%3A9001&force-path-style=true&secret-access-key=xxxxxx | `H`.`t_o_shard` | 102 | | finished | 1.073TB | 2299425000 | | 2023-06-18 13:23:05.608677 | 2023-06-18 13:23:05.662981 | 2023-06-18 15:06:41.729904 | root@% |
| 120001 | /data2/*.csv | `big`.`items` | 128 | | finished | 1.075TB | 45000000 | | 2023-06-19 12:44:34.068202 | 2023-06-19 12:44:34.303654 | 2023-06-19 16:00:52.860685 | root@% |
| 120002 | s3://tmp/9T-csv/big.items.*.csv?access-key=xxxxxx&endpoint=http%3A%2F%2Fminio-peer%3A9000&force-path-style=true&secret-access-key=xxxxxx | `big`.`items` | 159 | importing | failed | 3.224TB | NULL | the remaining storage capacity of TiKV(upstream-tikv-11.upstream-tikv-peer.import-into-20t-tps-1809273-1-798.svc:20160) is less than 10%; please increase the storage capacity of TiKV and try again | 2023-06-21 02:33:28.262121 | 2023-06-21 02:33:28.602627 | 2023-06-21 08:33:12.367371 | root@% |
| 150001 | /data2/*.csv | `big`.`items` | 143 | | finished | 1.075TB | 45000000 | | 2023-06-20 03:13:48.493883 | 2023-06-20 03:13:48.701379 | 2023-06-20 08:18:41.250435 | root@% |
| 150002 | /data2/*.csv | `big`.`items` | 145 | | finished | 1.075TB | 45000000 | | 2023-06-20 08:55:10.309647 | 2023-06-20 08:55:10.603143 | 2023-06-20 12:00:02.150180 | root@% |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+----------+-----------+-----------+------------------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+----------------------------+----------------------------+------------+
17 rows in set (0.00 sec)

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

120002 is the last created job, should be found in last or first

### 3. What did you see instead (Required)
the order may be not reasonably
### 4. What is your TiDB version? (Required)
master

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.