Skip to content

api: using index to replace tree scan if only returns count #5610

Merged
ti-chi-bot merged 10 commits intotikv:masterfrom
bufferflies:btree/stats
Oct 28, 2022
Merged

api: using index to replace tree scan if only returns count #5610
ti-chi-bot merged 10 commits intotikv:masterfrom
bufferflies:btree/stats

Conversation

@bufferflies
Copy link
Contributor

What problem does this PR solve?

Issue Number: Close #5607

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Code changes

Side effects

Related changes

Release note

 None.

Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 19, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • nolouch

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.

Details

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 added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 19, 2022
@ti-chi-bot ti-chi-bot requested review from JmPotato and Yisaer October 19, 2022 06:31
@bufferflies bufferflies changed the title Btree/stats api: using index to replace tree scan if only returns count Oct 19, 2022
@bufferflies
Copy link
Contributor Author

the fixed pr flame:
image

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Base: 75.68% // Head: 75.67% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (0650980) compared to base (cf003bb).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 0650980 differs from pull request most recent head d10d437. Consider uploading reports for the commit d10d437 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5610      +/-   ##
==========================================
- Coverage   75.68%   75.67%   -0.01%     
==========================================
  Files         327      327              
  Lines       32435    32457      +22     
==========================================
+ Hits        24548    24563      +15     
- Misses       5774     5775       +1     
- Partials     2113     2119       +6     
Flag Coverage Δ
unittests 75.67% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
server/api/stats.go 100.00% <100.00%> (ø)
server/cluster/cluster.go 82.73% <100.00%> (-0.05%) ⬇️
server/core/basic_cluster.go 90.32% <100.00%> (+0.13%) ⬆️
server/core/region.go 92.04% <100.00%> (+0.17%) ⬆️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-25.00%) ⬇️
pkg/metricutil/metricutil.go 82.75% <0.00%> (-10.35%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-6.76%) ⬇️
server/tso/tso.go 66.85% <0.00%> (-5.06%) ⬇️
server/region_syncer/server.go 82.96% <0.00%> (-4.40%) ⬇️
server/id/id.go 86.44% <0.00%> (-3.39%) ⬇️
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bufferflies
Copy link
Contributor Author

PTAL @CabinfeverB

@bufferflies bufferflies requested a review from JmPotato October 24, 2022 06:47
@ti-chi-bot
Copy link
Member

@bufferflies: PR needs rebase.

Details

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2022
@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 26, 2022
Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

The rest LGTM.

Copy link
Contributor Author

@bufferflies bufferflies left a comment

Choose a reason for hiding this comment

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

Yes, the ("","") will be found in the api unit test.

Signed-off-by: bufferflies <1045931706@qq.com>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 28, 2022
Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 28, 2022
@nolouch
Copy link
Contributor

nolouch commented Oct 28, 2022

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

Details

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.

@ti-chi-bot
Copy link
Member

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

DetailsCommit hash: 0650980

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 28, 2022
@ti-chi-bot
Copy link
Member

@bufferflies: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

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.

Details

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.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5651.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Oct 28, 2022
close tikv#5607

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@bufferflies bufferflies deleted the btree/stats branch November 1, 2022 09:47
ti-chi-bot added a commit that referenced this pull request Nov 1, 2022
…5651)

close #5607, ref #5610

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: bufferflies <1045931706@qq.com>

Co-authored-by: buffer <1045931706@qq.com>
Co-authored-by: bufferflies <1045931706@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. release-note-none Denotes a PR that doesn't merit a release note. 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.

Add filter in /pd/api/v1/stats/region API

5 participants