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

replica_strategy:speed up and reduce the complexity of selectStore to O(n) #5144

Merged

Conversation

AndreMouche
Copy link
Member

What problem does this PR solve?

Issue Number: Close #5143

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 13, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • bufferflies

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.

@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #5144 (b9d2c51) into master (5d744d3) will decrease coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5144      +/-   ##
==========================================
- Coverage   75.69%   75.55%   -0.15%     
==========================================
  Files         309      309              
  Lines       30586    30598      +12     
==========================================
- Hits        23153    23119      -34     
- Misses       5437     5471      +34     
- Partials     1996     2008      +12     
Flag Coverage Δ
unittests 75.55% <100.00%> (-0.15%) ⬇️

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

Impacted Files Coverage Δ
server/schedule/checker/replica_strategy.go 88.63% <100.00%> (-0.26%) ⬇️
server/schedule/filter/candidates.go 100.00% <100.00%> (ø)
server/tso/local_allocator.go 68.91% <0.00%> (-9.46%) ⬇️
...erver/config/service_middleware_persist_options.go 91.66% <0.00%> (-8.34%) ⬇️
server/region_syncer/server.go 83.15% <0.00%> (-4.35%) ⬇️
server/schedulers/random_merge.go 60.00% <0.00%> (-3.34%) ⬇️
client/base_client.go 79.38% <0.00%> (-2.58%) ⬇️
server/tso/allocator_manager.go 62.72% <0.00%> (-2.50%) ⬇️
server/tso/tso.go 69.49% <0.00%> (-1.70%) ⬇️
server/server.go 72.89% <0.00%> (-1.50%) ⬇️
... and 14 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 5d744d3...b9d2c51. Read the comment docs.

@tikv tikv deleted a comment from AndreMouche Jun 13, 2022
Signed-off-by: shirly <AndreMouche@126.com>
Copy link
Member

@CabinfeverB CabinfeverB left a comment

Choose a reason for hiding this comment

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

If we wanted to implement a retry mechanism in ReplicaStrategy, this method may be not useful

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 14, 2022
Signed-off-by: shirly <AndreMouche@126.com>
Signed-off-by: shirly <AndreMouche@126.com>
Copy link
Contributor

@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.

rest 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 Jun 15, 2022
Signed-off-by: shirly <AndreMouche@126.com>
@AndreMouche AndreMouche force-pushed the replica_strategg/speedup_select_store branch from 0f30219 to d94e80a Compare June 15, 2022 07:00
@nolouch
Copy link
Contributor

nolouch commented Jun 15, 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: d94e80a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 15, 2022
@ti-chi-bot ti-chi-bot merged commit b58a7d5 into tikv:master Jun 15, 2022
CabinfeverB pushed a commit to CabinfeverB/pd that referenced this pull request Jul 14, 2022
… O(n) (tikv#5144)

close tikv#5143

Signed-off-by: shirly <AndreMouche@126.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none 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.

replica_strategy: could we reduce the complexity of selectStore to O(n)
6 participants