-
Notifications
You must be signed in to change notification settings - Fork 747
tools: add show region by keyspace-id or table-id #9850
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Ryan Leung <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (17.24%) is below the target coverage (74.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #9850 +/- ##
==========================================
- Coverage 76.87% 76.77% -0.10%
==========================================
Files 491 491
Lines 78475 78641 +166
==========================================
+ Hits 60324 60374 +50
- Misses 14457 14554 +97
- Partials 3694 3713 +19
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| // NewRegionsByKeyspaceTableIDCommand returns regions with keyspace and tableID subcommand of regionCmd. | ||
| func NewRegionsByKeyspaceTableIDCommand() *cobra.Command { | ||
| r := &cobra.Command{ | ||
| Use: `keyspace-id <keyspace_id> [table-id <table_id>] [<limit>] [--jq="<query string>"]`, | ||
| Short: "show regions for keyspace or table", | ||
| Run: showRegionsByKeyspaceTableIDCommandFunc, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this command more general? That is, make the keyspace ID an optional parameter, so that for both the legacy architecture and the TiDB X architecture, we can use this command to query table regions with or without a keyspace ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After considering this, the PR primarily focuses on the keyspace. We can add an option parameter to the region command separately.
What problem does this PR solve?
Issue Number: ref #9707. cp https://github.com/tidbcloud/pd-cse/pull/355
What is changed and how does it work?
Check List
Tests
Release note