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

server: fix the data race problem (#3772) #3774

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #3772

Signed-off-by: Ryan Leung rleungx@gmail.com

What problem does this PR solve?

Closes #3771.

What is changed and how it works?

This PR moves the process of loading TTL configs before starting raftCluster.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

Fix the data race when the scheduler is started before loading TTL configurations

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@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/election Election related logic. type/cherry-pick-for-release-5.0 The PR belongs to release-5.0 cherry pick. labels Jun 15, 2021
@ti-chi-bot ti-chi-bot requested review from disksing and HunDunDM June 15, 2021 08:01
@ti-chi-bot ti-chi-bot requested a review from nolouch June 15, 2021 08:01
@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #3774 (2f5a3de) into release-5.0 (3dd3c7b) will decrease coverage by 0.04%.
The diff coverage is 83.09%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-5.0    #3774      +/-   ##
===============================================
- Coverage        74.60%   74.55%   -0.05%     
===============================================
  Files              245      245              
  Lines            24122    24194      +72     
===============================================
+ Hits             17997    18039      +42     
- Misses            4510     4533      +23     
- Partials          1615     1622       +7     
Flag Coverage Δ
unittests 74.55% <83.09%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
server/schedule/operator/builder.go 87.98% <ø> (ø)
server/api/router.go 97.05% <33.33%> (-2.34%) ⬇️
server/schedule/checker/rule_checker.go 78.37% <60.00%> (-1.63%) ⬇️
client/base_client.go 82.47% <75.00%> (-0.77%) ⬇️
server/server.go 72.48% <78.57%> (-0.43%) ⬇️
server/tso/tso.go 71.16% <86.11%> (-0.62%) ⬇️
server/core/store.go 82.97% <87.50%> (+1.51%) ⬆️
server/schedule/region_scatterer.go 88.47% <93.33%> (+1.43%) ⬆️
pkg/cache/ttl.go 97.77% <100.00%> (+0.15%) ⬆️
pkg/typeutil/time.go 100.00% <100.00%> (ø)
... and 26 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 53b7a3e...2f5a3de. Read the comment docs.

@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Jun 25, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 25, 2021
@ti-chi-bot
Copy link
Member Author

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • 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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 25, 2021
@JmPotato
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member Author

@JmPotato: 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: 486c766

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 25, 2021
@ti-chi-bot ti-chi-bot merged commit 08369e5 into tikv:release-5.0 Jun 25, 2021
@nolouch nolouch added this to the v5.0.3 milestone Jul 1, 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/election Election related 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.0 The PR belongs to release-5.0 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants