Closed realtaobo closed 1 week ago
The changes optimize how region and peer information is collected and stored in the information_schema.region_peers
table of the INFORMATION_SCHEMA database. Key modifications include adjustments to the add_region_peers
method to accept a table_id
parameter and the introduction of new SQL test files illustrating the creation, querying, and dropping of region peer-related tables.
File/Directory Path | Change Summary |
---|---|
src/catalog/src/information_schema/region_peers.rs |
Modified the add_region_peers method to accept a table_id parameter and adjusted its logic for handling region and peer information. |
.../distributed/information_schema/region_peers.result |
Introduced the creation of multiple tables related to region peers and included a sample SELECT query on the region_peers table and subsequent table drops. |
.../standalone/information_schema/region_peers.result |
Included the creation of several region peer-related tables, data selection, and table drops before switching back to the public schema. |
.../distributed/information_schema/region_peers.sql |
Added definitions for multiple tables in the INFORMATION_SCHEMA database related to region peers, partitioning logic, and a SELECT query on region peers. |
.../standalone/information_schema/region_peers.sql |
Defined the structure of region peer-related tables and included partitioning, data selection logic, and table drops in the INFORMATION_SCHEMA database. |
.../standalone/common/information_schema/region_peers.result |
Added logic for creating/manipulating tables in the information_schema database and a query for counting distinct region_id values, followed by table drops. |
.../standalone/common/information_schema/region_peers.sql |
Introduced table definitions related to region peers in the INFORMATION_SCHEMA database, including a count query and table dropping logic. |
Objective | Addressed | Explanation |
---|---|---|
information_schema.region_peers returns same region_id multiple times (#4157) |
✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.85%. Comparing base (
07cbaba
) to head (c4f26cc
).
PTAL @WenyXu
@realtaobo, that is nicely done. Would you like to add a sqlness test for this case?
Thanks!
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
Resolve #4157
What's changed and what's your intention?
as title.
Checklist
Summary by CodeRabbit
New Features
INFORMATION_SCHEMA
database for storing and managing region peer information.Bug Fixes
Tests