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) #4170

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated 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

Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Sep 27, 2021

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

codecov bot commented Sep 28, 2021

Codecov Report

Merging #4170 (c7ab2be) into release-5.2 (bb4b5c7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head c7ab2be differs from pull request most recent head 81e2c1c. Consider uploading reports for the commit 81e2c1c to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##           release-5.2    #4170   +/-   ##
============================================
  Coverage        74.68%   74.69%           
============================================
  Files              249      249           
  Lines            25537    25539    +2     
============================================
+ Hits             19073    19077    +4     
+ Misses            4778     4775    -3     
- Partials          1686     1687    +1     
Flag Coverage Δ
unittests 74.69% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
server/schedulers/hot_region_config.go 92.09% <100.00%> (+0.09%) ⬆️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-2.33%) ⬇️
server/tso/tso.go 62.98% <0.00%> (-2.21%) ⬇️
server/election/lease.go 94.91% <0.00%> (-1.70%) ⬇️
server/schedule/operator_controller.go 84.75% <0.00%> (-0.80%) ⬇️
server/grpc_service.go 47.00% <0.00%> (-0.46%) ⬇️
server/server.go 71.27% <0.00%> (-0.31%) ⬇️
client/client.go 71.82% <0.00%> (-0.14%) ⬇️
server/cluster/coordinator.go 73.58% <0.00%> (+0.67%) ⬆️
... 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 ce4abef...81e2c1c. Read the comment docs.

@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 Oct 9, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Oct 12, 2021
@nolouch
Copy link
Contributor

nolouch commented Oct 12, 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: add2d38

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 12, 2021
@nolouch
Copy link
Contributor

nolouch commented Oct 13, 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 ti-chi-bot merged commit 24d1383 into tikv:release-5.2 Oct 13, 2021
@zhouqiang-cl zhouqiang-cl added this to the v5.2.2 milestone Oct 20, 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/config Configuration 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/cherry-pick-for-release-5.2 The PR belongs to release-5.2 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants