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 ScheduleConfig data race #1307

Merged
merged 3 commits into from Nov 6, 2018

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Nov 2, 2018

What problem does this PR solve?

When we call run() in coordinator, it will write scheduleCfg. However, some functions such as GetMaxStoreDownTime() may read this variable at the same time which will lead to a data race.

What is changed and how it works?

This PR fixes this problem by cloning the scheduleCfg.

Check List

Tests

  • Manual test (make test)

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release notes

@nolouch nolouch merged commit 2902d86 into tikv:master Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants