information_schema.analyze_status contains unreasonable value
- 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. Create a cluster
2. Insert some data
3. Check the information_schema.analyze_status table
### 2. What did you expect to see? (Required)
Normal values.
### 3. What did you see instead (Required)
```sql
MySQL [(none)]> select * from information_schema.analyze_status where REMAINING_SECONDS is not NULL;
+--------------+----------------------+----------------+--------------------------------------------------------------------------------------------+----------------+---------------------+----------+---------+-------------+------------------+------------------+---------------------------+--------------------------+----------------------+
| TABLE_SCHEMA | TABLE_NAME | PARTITION_NAME | JOB_INFO | PROCESSED_ROWS | START_TIME | END_TIME | STATE | FAIL_REASON | INSTANCE | PROCESS_ID | REMAINING_SECONDS | PROGRESS | ESTIMATED_TOTAL_ROWS |
+--------------+----------------------+----------------+--------------------------------------------------------------------------------------------+----------------+---------------------+----------+---------+-------------+------------------+------------------+---------------------------+--------------------------+----------------------+
| rtdb | xsxxxxx | | auto analyze table all columns with 256 buckets, 500 topn, 0.027494501099780043 samplerate | 0 | 2024-01-16 16:53:10 | NULL | running | NULL | tidb-1-peer:4000 | 1548112371908607 | -1257798h29m28.742690304s | 0.0000002499500099980004 | 4000800 |
+--------------+----------------------+----------------+--------------------------------------------------------------------------------------------+----------------+---------------------+----------+---------+-------------+------------------+------------------+---------------------------+--------------------------+----------------------+
1 row in set (0.00 sec)
```
```sql
select * from mysql.analyze_jobs where table_schema = 'rtdb' and table_name = 'zto_ssmx_bill_detail';
| 150001 | 2024-01-16 16:55:53 | rtdb | xxxx | | auto analyze table all columns with 256 buckets, 500 topn, 0.027494501099780043 samplerate | 4000800 | 2024-01-16 16:53:10 | 2024-01-16 16:55:53 | failed | [executor:8176]Your query has been cancelled due to exceeding the allowed memory limit for the tidb-server instance and this query is currently using the most memory. Please try narrowing your query scope or increase the tidb_server_memory_limit and try again.[conn=1548112371908607] | tidb-1-peer:4000 | NULL |
| 150002 | 2024-01-16 16:55:53 | rtdb | xxxxx | | auto analyze table all columns with 256 buckets, 500 topn, 0.027494501099780043 samplerate | 0 | 2024-01-16 16:55:53 | NULL | running | NULL | tidb-1-peer:4000 | 1548112371908607 |
+--------+---------------------+--------------+----------------------+----------------+--------------------------------------------------------------------------------------------+----------------+---------------------+---------------------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------+
```
### 4. What is your TiDB version? (Required)
master
Contributor guide
Assessment
This issue has not been assessed yet.