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

pkg: add new range tree to store key range struct #4913

Merged
merged 17 commits into from
May 16, 2022

Conversation

bufferflies
Copy link
Contributor

@bufferflies bufferflies commented May 9, 2022

What problem does this PR solve?

Issue Number: ref #4726
details: https://leetcode.cn/problems/interval-list-intersections/

What is changed and how does it work?

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

Release note

 None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 9, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HunDunDM
  • 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.

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 do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. labels May 9, 2022
@ti-chi-bot ti-chi-bot requested review from disksing and JmPotato May 9, 2022 11:59
@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #4913 (9bd855a) into master (9dad950) will increase coverage by 0.05%.
The diff coverage is 97.70%.

@@            Coverage Diff             @@
##           master    #4913      +/-   ##
==========================================
+ Coverage   75.19%   75.25%   +0.05%     
==========================================
  Files         297      298       +1     
  Lines       29488    29532      +44     
==========================================
+ Hits        22174    22224      +50     
+ Misses       5366     5361       -5     
+ Partials     1948     1947       -1     
Flag Coverage Δ
unittests 75.25% <97.70%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
server/core/region_tree.go 94.16% <96.66%> (-1.18%) ⬇️
pkg/rangetree/range_tree.go 98.24% <98.24%> (ø)
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-6.76%) ⬇️
server/schedulers/random_merge.go 60.00% <0.00%> (-3.34%) ⬇️
server/tso/tso.go 67.79% <0.00%> (-2.83%) ⬇️
server/schedule/labeler/rules.go 87.50% <0.00%> (-2.28%) ⬇️
server/statistics/store_collection.go 94.23% <0.00%> (-1.29%) ⬇️
server/schedule/operator_controller.go 84.47% <0.00%> (-1.21%) ⬇️
server/schedule/operator/step.go 74.07% <0.00%> (-1.02%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9dad950...9bd855a. Read the comment docs.

@bufferflies bufferflies requested review from lhy1024 and HunDunDM May 10, 2022 02:08
pkg/cache/ring.go Outdated Show resolved Hide resolved
pkg/cache/ring.go Outdated Show resolved Hide resolved
pkg/cache/ring.go Outdated Show resolved Hide resolved
@bufferflies bufferflies changed the title pkg: add new ring cache to store bucket hot degree pkg: add new bucket tree to store bucket hot degree May 11, 2022
@bufferflies bufferflies force-pushed the feature/ring branch 3 times, most recently from c10d49c to 138c3f9 Compare May 12, 2022 02:05
Signed-off-by: bufferflies <[email protected]>
Signed-off-by: bufferflies <[email protected]>
@bufferflies bufferflies changed the title pkg: add new bucket tree to store bucket hot degree statistics: add new bucket tree to store bucket hot degree May 12, 2022
@bufferflies bufferflies requested a review from lhy1024 May 12, 2022 04:01
@nolouch
Copy link
Contributor

nolouch commented May 13, 2022

Better to directly use region tree, we can make an item interface, then you can NewBucketTree and NewRegionTree, they share a common code.

Signed-off-by: bufferflies <[email protected]>
Signed-off-by: bufferflies <[email protected]>
Signed-off-by: bufferflies <[email protected]>
Signed-off-by: bufferflies <[email protected]>
server/core/region_tree.go Outdated Show resolved Hide resolved
Signed-off-by: bufferflies <[email protected]>
@bufferflies bufferflies changed the title statistics: add new bucket tree to store bucket hot degree pkg: add new range tree to store key range struct May 13, 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.

rest LGTM

pkg/rangetree/range_tree.go Show resolved Hide resolved
pkg/rangetree/range_tree.go Show resolved Hide resolved
Copy link
Member

@HunDunDM HunDunDM left a comment

Choose a reason for hiding this comment

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

rest LGTM

server/core/region_tree.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 16, 2022
Signed-off-by: bufferflies <[email protected]>
@bufferflies bufferflies requested a review from nolouch May 16, 2022 10:38
@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 May 16, 2022
@nolouch
Copy link
Contributor

nolouch commented May 16, 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

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.

Commit hash: 804be9c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 16, 2022
@bufferflies
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

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 ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label May 16, 2022
@HunDunDM
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

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.

Commit hash: 9bd855a

@ti-chi-bot ti-chi-bot added status/can-merge Indicates a PR has been approved by a committer. and removed do-not-merge/needs-linked-issue labels May 16, 2022
@ti-chi-bot ti-chi-bot merged commit 562586c into tikv:master May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants