We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metrics_schema
Please answer these questions before submitting your issue. Thanks!
Setup a cluster with 2 tidb nodes.
Run the SQL below in each node:
select tidb_table_id, table_name from information_schema.tables where table_schema='metrics_schema' and table_name='tidb_ddl_total_time' limit 1;
The query returns the same result in different TiDB nodes.
The results are not the same.
In one node
> select tidb_table_id, table_name from information_schema.tables where table_schema='metrics_schema' and table_name='tidb_ddl_total_time' limit 1; +---------------------+---------------------+ | tidb_table_id | table_name | +---------------------+---------------------+ | 4611686018427408458 | tidb_ddl_total_time | +---------------------+---------------------+
In another node
> select tidb_table_id, table_name from information_schema.tables where table_schema='metrics_schema' and table_name='tidb_ddl_total_time' limit 1; +---------------------+---------------------+ | tidb_table_id | table_name | +---------------------+---------------------+ | 4611686018427408007 | tidb_ddl_total_time | +---------------------+---------------------+ 1 row in set Time: 0.010s
The text was updated successfully, but these errors were encountered:
The meta of tables in metrics_schema is generated in memory by iterating MetricTableMap
MetricTableMap
tidb/pkg/infoschema/metrics_schema.go
Lines 44 to 56 in 4275195
However, MetricTableMap is an object of type map that does not guarantee the order when iterating.
map
tidb/pkg/infoschema/metric_table_def.go
Line 19 in 4275195
Sorry, something went wrong.
da14ce7
lcwangchao
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Setup a cluster with 2 tidb nodes.
Run the SQL below in each node:
2. What did you expect to see? (Required)
The query returns the same result in different TiDB nodes.
3. What did you see instead (Required)
The results are not the same.
In one node
In another node
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: