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

test: fix data race caused by update global config #17964

Merged
merged 2 commits into from
Jun 12, 2020

Conversation

coocood
Copy link
Member

@coocood coocood commented Jun 11, 2020

What problem does this PR solve?

Fix data race

What is changed and how it works?

What's Changed:

  • added UpdateGlobal function in the config package.
  • added RestoreFunc function in the config package.
  • use the two functions to change and restore global config in test.

Check List

Tests

  • Unit test

Release note

  • No release note

@coocood
Copy link
Member Author

coocood commented Jun 11, 2020

/run-check_dev_2

@codecov
Copy link

codecov bot commented Jun 11, 2020

Codecov Report

Merging #17964 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #17964   +/-   ##
===========================================
  Coverage   79.5261%   79.5261%           
===========================================
  Files           524        524           
  Lines        142162     142162           
===========================================
  Hits         113056     113056           
  Misses        19987      19987           
  Partials       9119       9119           

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 12, 2020
Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lysu
Copy link
Contributor

lysu commented Jun 12, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Jun 12, 2020

Sorry @lysu, you don't have permission to trigger auto merge event on this branch. You are not a committer for the related sigs:ddl(slack),execution(slack).

@lysu lysu removed sig/sql-infra SIG: SQL Infra component/config sig/execution SIG execution labels Jun 12, 2020
@lysu
Copy link
Contributor

lysu commented Jun 12, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 12, 2020
@lysu lysu added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 12, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 12, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 12, 2020

@coocood merge failed.

@coocood coocood merged commit a8da23c into pingcap:master Jun 12, 2020
@coocood coocood deleted the global-config branch June 12, 2020 05:05
overvenus pushed a commit to overvenus/tidb that referenced this pull request Aug 20, 2020
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
jebter pushed a commit that referenced this pull request Aug 20, 2020
* test: fix data race caused by update global config (#17964)

Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>

* fix make dev

Signed-off-by: Neil Shen <overvenus@gmail.com>

* update kvproto and pd

Signed-off-by: Neil Shen <overvenus@gmail.com>

Co-authored-by: Evan Zhou <coocood@gmail.com>
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test 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.

4 participants