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

pdctl: support top query in pdctl #7843

Merged
merged 12 commits into from Apr 12, 2024
Merged

pdctl: support top query in pdctl #7843

merged 12 commits into from Apr 12, 2024

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Feb 22, 2024

What problem does this PR solve?

Issue Number: Close #7369

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: lhy1024 <admin@liudos.us>
Copy link
Contributor

ti-chi-bot bot commented Feb 22, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HuSharp
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot requested review from nolouch and rleungx February 22, 2024 12:11
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 22, 2024
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2024
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Merging #7843 (a9a1dd8) into master (8f7999e) will increase coverage by 0.04%.
The diff coverage is 91.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7843      +/-   ##
==========================================
+ Coverage   77.22%   77.26%   +0.04%     
==========================================
  Files         468      468              
  Lines       60879    60937      +58     
==========================================
+ Hits        47011    47086      +75     
+ Misses      10315    10289      -26     
- Partials     3553     3562       +9     
Flag Coverage Δ
unittests 77.26% <91.17%> (+0.04%) ⬆️

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

r.AddCommand(topWriteFlow)

topReadQuery := &cobra.Command{
Use: `topread-query <limit> [--jq="<query string>"]`,
Copy link
Member

Choose a reason for hiding this comment

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

How about not using -? BTW, do we need the key dimension?

Copy link
Contributor

@nolouch nolouch Feb 26, 2024

Choose a reason for hiding this comment

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

How about unifying as topreadflow and topreadquery. or topread flow, topread query as a parameter after topread.

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@@ -226,6 +228,32 @@ func showRegionsTopCommand(prefix string) run {
}
}

func showTopReadRegions(cmd *cobra.Command, args []string) {
if len(args) < 1 && args[0] != "query" && args[0] != "byte" {
Copy link
Member

Choose a reason for hiding this comment

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

Will it break the compatibility?

lhy1024 and others added 2 commits February 27, 2024 14:36
Signed-off-by: lhy1024 <admin@liudos.us>
@@ -1144,6 +1144,34 @@ func (suite *configTestSuite) checkMicroServiceConfig(cluster *pdTests.TestClust
re.False(svr.GetMicroServiceConfig().EnableSchedulingFallback)
}

func (suite *configTestSuite) TestRegionRules() {
Copy link
Member

Choose a reason for hiding this comment

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

Why add it in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From other unmerged pr

Copy link
Member

Choose a reason for hiding this comment

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

Then, we should remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or opening a new pr for adding test to cover it? They are both acceptable for me.

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 11, 2024
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 11, 2024
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@lhy1024
Copy link
Contributor Author

lhy1024 commented Apr 12, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented Apr 12, 2024

@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Copy link
Contributor

ti-chi-bot bot commented Apr 12, 2024

This pull request has been accepted and is ready to merge.

Commit hash: a244a4e

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 12, 2024
@ti-chi-bot ti-chi-bot bot merged commit 1cd99f1 into tikv:master Apr 12, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support querying top region with QPS dimension
4 participants