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 WaitGroup data race #1273

merged 2 commits into from Oct 17, 2018


Copy link

commented Oct 16, 2018

What problem does this PR solve?

At present, coordinator uses WaitGroup to synchronize. We call Add() in (c *coordinator) run() and Wait() in (c *coordinator) stop() which are in different goroutines. So the data race could happen when the leader drops. This PRs closes #1268.

What is changed and how it works?

Check List


  • Manual test (make test)

Related changes

  • Need to be included in the release notes

@rleungx rleungx requested review from nolouch and disksing Oct 16, 2018

@rleungx rleungx force-pushed the rleungx:fix-wg-data-race branch from edcf7fa to a1e75fb Oct 16, 2018

Copy link

left a comment


@nolouch nolouch merged commit 9b3ebe1 into pingcap:master Oct 17, 2018

5 checks passed

ci/circleci Your tests passed on CircleCI!
continuous-integration/travis-ci/pr The Travis CI build passed
jenkins-ci-pd/build Jenkins job succeeded.
jenkins-ci-pd/unit-test Jenkins job succeeded.
license/cla Contributor License Agreement is signed.
rleungx added a commit to rleungx/pd that referenced this pull request Oct 23, 2018
disksing added a commit that referenced this pull request Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.