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

scheduler: reduce GetStore in hot-region-scheduler (#3870) #3910

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #3870

Signed-off-by: HunDunDM [email protected]

What problem does this PR solve?

What is changed and how it works?

Reduce GetStore in hot-region-scheduler. In addition to preventing panic caused by data inconsistency, it can also reduce the use of BasicCluster locks.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

Fix the bug that PD may panic during scaling out TiKV.

@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Jul 27, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • 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 release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved labels Jul 27, 2021
@ti-chi-bot ti-chi-bot added component/scheduler Scheduler logic. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-5.0 The PR belongs to release-5.0 cherry pick. labels Jul 27, 2021
@ti-chi-bot ti-chi-bot requested review from disksing and nolouch July 27, 2021 06:31
@disksing
Copy link
Contributor

@HunDunDM Need to resolve conflict

@HunDunDM HunDunDM added this to the v5.0.4 milestone Aug 11, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 13, 2021
@HunDunDM HunDunDM force-pushed the cherry-pick-3870-to-release-5.0 branch from 8d126be to 0960dbc Compare August 16, 2021 05:23
@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #3910 (0960dbc) into release-5.0 (1b3f93e) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-5.0    #3910      +/-   ##
===============================================
+ Coverage        74.62%   74.77%   +0.14%     
===============================================
  Files              245      245              
  Lines            24241    24248       +7     
===============================================
+ Hits             18091    18132      +41     
+ Misses            4528     4502      -26     
+ Partials          1622     1614       -8     
Flag Coverage Δ
unittests 74.77% <100.00%> (+0.14%) ⬆️

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

Impacted Files Coverage Δ
server/schedulers/utils.go 93.10% <ø> (ø)
server/schedulers/hot_region.go 80.79% <100.00%> (+0.96%) ⬆️
server/schedulers/shuffle_hot_region.go 65.30% <100.00%> (+1.09%) ⬆️
server/election/leadership.go 83.52% <0.00%> (-3.53%) ⬇️
server/cluster/coordinator.go 75.17% <0.00%> (-0.72%) ⬇️
server/cluster/cluster.go 83.31% <0.00%> (+0.36%) ⬆️
server/handler.go 42.46% <0.00%> (+0.49%) ⬆️
client/base_client.go 82.98% <0.00%> (+0.51%) ⬆️
server/grpc_service.go 47.17% <0.00%> (+0.56%) ⬆️
pkg/btree/btree.go 86.26% <0.00%> (+0.96%) ⬆️
... and 4 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 1b3f93e...0960dbc. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 16, 2021
@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 Aug 16, 2021
@nolouch
Copy link
Contributor

nolouch commented Aug 16, 2021

/merge

@ti-chi-bot
Copy link
Member Author

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

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

Commit hash: 0960dbc

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 16, 2021
@ti-chi-bot ti-chi-bot merged commit 6864bb3 into tikv:release-5.0 Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. component/scheduler Scheduler logic. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-5.0 The PR belongs to release-5.0 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants