`show restores` doesn't show the restore task
- 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)
1. deploy a cluster
2. use sql `restore database xxx from xxx` to restore data
3. show restores to check the resule
### 2. What did you expect to see? (Required)
show the correct result
### 3. What did you see instead (Required)
restore task doesn't show in list
```sql
[16:11:59]TiDB root:mysql> show processlist;
+---------------------+------+-------------------+--------+---------+------+------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+---------------------+------+-------------------+--------+---------+------+------------+------------------------------------------------------------------------------------------------------+
| 1014954785553514557 | root | 172.16.6.55:28729 | | Query | 860 | autocommit | RESTORE DATABASE `partitioninsert_1647963896275` FROM 's3://xxxx' |
| 1014954785553514721 | root | 172.16.6.55:8572 | mysql | Query | 0 | autocommit | show processlist |
+---------------------+------+-------------------+--------+---------+------+------------+------------------------------------------------------------------------------------------------------+
2 rows in set
Time: 0.047s
----------------------------
[16:08:05]TiDB root:(none)> show restores;
+----+----------------------------------------------+---------+-------------------+---------------------+---------------------+---------------------+---------------------+---------+
| Id | Destination | State | Progress | Queue_time | Execution_time | Finish_time | Connection | Message |
+----+----------------------------------------------+---------+-------------------+---------------------+---------------------+---------------------+---------------------+---------+
| 1 | s3://xxxx| Restore | 64.12213740458016 | 2023-07-18 07:57:39 | 2023-07-18 07:57:39 | 0000-00-00 00:00:00 | 1014954785553514557 | |
+----+----------------------------------------------+---------+-------------------+---------------------+---------------------+---------------------+---------------------+---------+
1 row in set
Time: 0.048s
[16:08:07]TiDB root:(none)> show restores;
+----+-------------+-------+----------+------------+----------------+-------------+------------+---------+
| Id | Destination | State | Progress | Queue_time | Execution_time | Finish_time | Connection | Message |
+----+-------------+-------+----------+------------+----------------+-------------+------------+---------+
+----+-------------+-------+----------+------------+----------------+-------------+------------+---------+
0 rows in set
```
### 4. What is your TiDB version? (Required)
```sql
[16:12:47]TiDB root:mysql> select type,version,git_hash from information_schema.cluster_info where type = 'tidb';
+------+-------------+------------------------------------------+
| type | version | git_hash |
+------+-------------+------------------------------------------+
| tidb | 7.3.0-alpha | 492e0df543c6944e82b4c14bd7166eba6c764258 |
+------+-------------+------------------------------------------+
```
Contributor guide
Assessment
This issue has not been assessed yet.