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

Merged
merged 1 commit into from
Jun 15, 2021
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jun 15, 2021

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>
@rleungx rleungx added the component/election Election related logic. label Jun 15, 2021
@ti-chi-bot ti-chi-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 15, 2021
@rleungx rleungx added needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 labels Jun 15, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 15, 2021
@ti-chi-bot
Copy link
Member

[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 15, 2021
@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #3772 (52711fb) into master (69209e0) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3772      +/-   ##
==========================================
+ Coverage   74.93%   75.01%   +0.07%     
==========================================
  Files         245      245              
  Lines       24531    24531              
==========================================
+ Hits        18382    18401      +19     
+ Misses       4516     4503      -13     
+ Partials     1633     1627       -6     
Flag Coverage Δ
unittests 75.01% <100.00%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
server/server.go 72.07% <100.00%> (-0.31%) ⬇️
server/region_syncer/server.go 83.33% <0.00%> (-6.07%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-1.67%) ⬇️
pkg/btree/btree.go 85.30% <0.00%> (-0.97%) ⬇️
server/cluster/coordinator.go 72.42% <0.00%> (-0.72%) ⬇️
server/grpc_service.go 48.11% <0.00%> (ø)
server/tso/allocator_manager.go 79.13% <0.00%> (+0.16%) ⬆️
client/client.go 71.96% <0.00%> (+0.27%) ⬆️
server/schedulers/utils.go 94.79% <0.00%> (+1.04%) ⬆️
... and 7 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 69209e0...52711fb. Read the comment docs.

@disksing
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@disksing: 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

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

Commit hash: 52711fb

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 15, 2021
@rleungx
Copy link
Member Author

rleungx commented Jun 15, 2021

/run-integration-common-test

@ti-chi-bot ti-chi-bot merged commit 585e056 into tikv:master Jun 15, 2021
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3773.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 15, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3774.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3775.

ti-chi-bot added a commit that referenced this pull request Jun 16, 2021
Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
ti-chi-bot added a commit that referenced this pull request Jun 25, 2021
Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
ti-chi-bot added a commit that referenced this pull request Jul 6, 2021
* This is an automated cherry-pick of #3772

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

* resolve conflicts

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

Co-authored-by: Ryan Leung <rleungx@gmail.com>
bufferflies pushed a commit to bufferflies/pd that referenced this pull request Jul 9, 2021
Signed-off-by: Ryan Leung <rleungx@gmail.com>
bufferflies pushed a commit to bufferflies/pd that referenced this pull request Jul 9, 2021
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/election Election related logic. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data race when scheduler is started before server is ready to serve
5 participants