pingcap/tidb

query TIKV_REGION_STATUS return some unexpected result

Open

#50 809 ouverte le 30 janv. 2024

Voir sur GitHub
 (0 commentaires) (0 réactions) (1 assigné)Go (6 186 forks)batch import
help wantedseverity/minorsig/sql-infratype/bug

Métriques du dépôt

Stars
 (40 090 stars)
Métriques de merge PR
 (Merge moyen 14j 4h) (346 PRs mergées en 30 j)

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

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

Guide contributeur