pd icon indicating copy to clipboard operation
pd copied to clipboard

balance_region: remove the unnecessary retry when try to pick a region to transfer

Open AndreMouche opened this issue 3 years ago • 3 comments

What problem does this PR solve?

Issue Number: Close #5397

What is changed and how does it work?

Check List

Tests

benchmark

current-branch

wuxuelian@fun-2 ~/go/pd/server/schedulers                                                                                                                                                                    [14:18:23] 
> $ go test -benchmem -run=^$ -bench ^Benchmark  -benchtime=100x                                                                                                                            [±balance_region_speedup ●]
goos: darwin
goarch: amd64
pkg: github.com/tikv/pd/server/schedulers
cpu: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
BenchmarkPlacementRule-12  100          50000943 ns/op        24047141 B/op     708799 allocs/op
BenchmarkLabel-12                    100           7949532 ns/op         2518519 B/op      28179 allocs/op
BenchmarkNoLabel-12                  100           8786278 ns/op         1570206 B/op      21677 allocs/op
BenchmarkTombStore-12                100           8777006 ns/op         1570173 B/op      21677 allocs/op

master

> $ go test -benchmem -run=^$ -bench ^Benchmark  -benchtime=100x                                                                                                                                            [±master ●]
goos: darwin
goarch: amd64
pkg: github.com/tikv/pd/server/schedulers
cpu: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
BenchmarkPlacementRule-12    100          52804382 ns/op        24047187 B/op     708797 allocs/op
BenchmarkLabel-12                    100           9142366 ns/op         2518413 B/op      28176 allocs/op
BenchmarkNoLabel-12                  100           9116922 ns/op         1570108 B/op      21674 allocs/op
BenchmarkTombStore-12                100           9027190 ns/op         1570099 B/op      21674 allocs/op
  • Unit test

Release note

 None.

AndreMouche avatar Aug 04 '22 03:08 AndreMouche

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 avatar Aug 04 '22 03:08 ti-chi-bot

Codecov Report

:x: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 75.75%. Comparing base (99e38eb) to head (0d6711b). :warning: Report is 1913 commits behind head on master.

Files with missing lines Patch % Lines
server/schedule/filter/region_filters.go 81.81% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5398      +/-   ##
==========================================
+ Coverage   75.58%   75.75%   +0.16%     
==========================================
  Files         312      312              
  Lines       31061    31074      +13     
==========================================
+ Hits        23479    23541      +62     
+ Misses       5572     5534      -38     
+ Partials     2010     1999      -11     
Flag Coverage Δ
unittests 75.75% <94.44%> (+0.16%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Aug 04 '22 06:08 codecov[bot]

@AndreMouche: PR needs rebase.

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 avatar Aug 16 '22 12:08 ti-chi-bot