Skip to content
New issue

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

information_schema.region_peers returns same region_id multiple times #4157

Closed
WenyXu opened this issue Jun 17, 2024 · 1 comment · Fixed by #4190
Closed

information_schema.region_peers returns same region_id multiple times #4157

WenyXu opened this issue Jun 17, 2024 · 1 comment · Fixed by #4190
Labels
C-bug Category Bugs good first issue Good for newcomers

Comments

@WenyXu
Copy link
Member

WenyXu commented Jun 17, 2024

What type of bug is this?

Incorrect result

What subsystems are affected?

Table Engine

Minimal reproduce step

CREATE TABLE phy (ts timestamp time index, val double) engine=metric with ("physical_metric_table" = "");
CREATE TABLE t1 (ts timestamp time index, val double, host string primary key) engine = metric with ("on_physical_table" = "phy");
CREATE TABLE t2 (ts timestamp time index, job string primary key, val double) engine = metric with ("on_physical_table" = "phy");
select * from information_schema.region_peers;

What did you expect to see?

+---------------+---------+-----------+-----------+--------+--------------+
| region_id     | peer_id | peer_addr | is_leader | status | down_seconds |
+---------------+---------+-----------+-----------+--------+--------------+
| 4402341478400 |       0 |           | Yes       | ALIVE  |         NULL |
| 4406636445696 |       0 |           | Yes       | ALIVE  |         NULL |
| 4398046511104 |       0 |           | Yes       | ALIVE  |         NULL |
+---------------+---------+-----------+-----------+--------+--------------+

What did you see instead?

+---------------+---------+-----------+-----------+--------+--------------+
| region_id     | peer_id | peer_addr | is_leader | status | down_seconds |
+---------------+---------+-----------+-----------+--------+--------------+
| 4398046511104 |       0 |           | Yes       | ALIVE  |         NULL |
| 4398046511104 |       0 |           | Yes       | ALIVE  |         NULL |
| 4398046511104 |       0 |           | Yes       | ALIVE  |         NULL |
+---------------+---------+-----------+-----------+--------+--------------+

What operating system did you use?

doesn't matter

What version of GreptimeDB did you use?

main

Relevant log output and stack trace

No response

@WenyXu WenyXu added C-bug Category Bugs good first issue Good for newcomers labels Jun 17, 2024
@killme2008
Copy link
Contributor

Looks like it always uses the physical region route info:

.batch_get_physical_table_routes(table_ids)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants