query TIKV_REGION_STATUS return some unexpected result
- 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)
related issue: https://github.com/pingcap/tidb/issues/50808
```sql
show table information_schema.tables regions;
+-----------+--------------------+----------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+------------------------+------------------+
| REGION_ID | START_KEY | END_KEY | LEADER_ID | LEADER_STORE_ID | PEERS | SCATTERING | WRITTEN_BYTES | READ_BYTES | APPROXIMATE_SIZE(MB) | APPROXIMATE_KEYS | SCHEDULING_CONSTRAINTS | SCHEDULING_STATE |
+-----------+--------------------+----------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+------------------------+------------------+
| 52 | t_281474976710654_ | 78000000 | 53 | 1 | 53 | 0 | 0 | 1872000 | 1 | 477 | | |
+-----------+--------------------+----------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+------------------------+------------------+
```
```sql
select DB_NAME, TABLE_NAME from `TIKV_REGION_STATUS` where `REGION_ID` = 52 group by DB_NAME, TABLE_NAME;
+--------------------+---------------------------------------------------+
| DB_NAME | TABLE_NAME |
+--------------------+---------------------------------------------------+
| PERFORMANCE_SCHEMA | session_account_connect_attrs |
| METRICS_SCHEMA | tidb_qps_ideal |
| INFORMATION_SCHEMA | METRICS_SUMMARY_BY_LABEL |
...
...
...
| METRICS_SCHEMA | node_memory_usage |
+--------------------+---------------------------------------------------+
761 rows in set
```
### 2. What did you expect to see? (Required)
The final query result doesn't contain a system memory table.
### 3. What did you see instead (Required)
The final query result contain all system memory table, but memory table doesn't have any data in any tikv regions.
### 4. What is your TiDB version? (Required)
```sql
+-----------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------+
| Release Version: v8.0.0-alpha-143-g7087f70 |
| Edition: Community |
| Git Commit Hash: 7087f702e18f811c98d5a276eace7bb69292c6aa |
| Git Branch: HEAD |
| UTC Build Time: 2024-01-30 03:53:25 |
| GoVersion: go1.21.4 |
| Race Enabled: false |
| Check Table Before Drop: false |
| Store: tikv |
+-----------------------------------------------------------+
```
Contributor guide
Assessment
This issue has not been assessed yet.