Skip to content

Conversation

@rleungx
Copy link
Member

@rleungx rleungx commented Oct 21, 2025

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

  • Unit test

Release note

None.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Oct 21, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 21, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign siddontang for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 21, 2025
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 17.24138% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.77%. Comparing base (14ac685) to head (7ddabdd).
⚠️ Report is 3 commits behind head on master.

❌ 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     
Flag Coverage Δ
unittests 76.77% <17.24%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +422 to +428
// 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,
}
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good suggestion

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants