pingcap/tidb

query TIKV_REGION_STATUS return some unexpected result

Open

#50,809 创建于 2024年1月30日

在 GitHub 查看
 (0 评论) (0 反应) (1 负责人)Go (40,090 star) (6,186 fork)batch import
help wantedseverity/minorsig/sql-infratype/bug

描述

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

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              |                        |                  |
+-----------+--------------------+----------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+------------------------+------------------+
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)

+-----------------------------------------------------------+
| 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                                               |
+-----------------------------------------------------------+

贡献者指南