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

*: fix race in hot region config (#4167) #4176

Conversation

HunDunDM
Copy link
Member

Signed-off-by: HunDunDM [email protected]

This is a cherry-pick of #4167

What problem does this PR solve?

Close #4159.

What is changed and how it works?

Use the lock correctly.

Check List

Tests

  • Unit test

Release note

Fix the data race problem of hot region config

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 28, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

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/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Sep 28, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 28, 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 Sep 28, 2021
@codecov
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #4176 (df779c3) into release-5.1-20210926 (15cf76e) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           release-5.1-20210926    #4176      +/-   ##
========================================================
+ Coverage                 75.15%   75.22%   +0.06%     
========================================================
  Files                       245      245              
  Lines                     24863    24863              
========================================================
+ Hits                      18687    18702      +15     
+ Misses                     4541     4532       -9     
+ Partials                   1635     1629       -6     
Flag Coverage Δ
unittests 75.22% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
server/schedulers/hot_region_config.go 83.65% <100.00%> (ø)
server/tso/global_allocator.go 70.55% <0.00%> (-5.00%) ⬇️
server/schedulers/random_merge.go 60.65% <0.00%> (-3.28%) ⬇️
server/member/member.go 67.20% <0.00%> (-2.69%) ⬇️
server/election/leadership.go 81.17% <0.00%> (-2.36%) ⬇️
server/tso/allocator_manager.go 78.63% <0.00%> (-0.51%) ⬇️
server/grpc_service.go 48.11% <0.00%> (-0.46%) ⬇️
client/client.go 71.96% <0.00%> (+0.27%) ⬆️
server/cluster/cluster.go 83.60% <0.00%> (+0.34%) ⬆️
server/cluster/coordinator.go 74.05% <0.00%> (+0.70%) ⬆️
... and 5 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 15cf76e...df779c3. Read the comment docs.

@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Sep 28, 2021
@zhouqiang-cl zhouqiang-cl merged commit 897734a into tikv:release-5.1-20210926 Sep 28, 2021
@HunDunDM HunDunDM deleted the release-5.1-20210926-patch-4167 branch September 28, 2021 09:14
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants