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

domain: run FLUSH PRIVILEGES synchronous on GRANT #8886

Merged
merged 2 commits into from Dec 31, 2018

Conversation

Projects
None yet
3 participants
@morgo
Copy link
Member

morgo commented Dec 29, 2018

What problem does this PR solve?

Fixes #8427

What is changed and how it works?

When a GRANT, DROP USER, CREATE USER is run, TiDB will asynchronously notify peers via etcd. The problem is that for the test suite, mocktikv (and MySQL compatibility) it is required to run FLUSH PRIVILEGES synchronously. This is because changes are expected to apply immediately.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Code changes

  • Yes

Side effects

  • Possible performance regression (the server will do more work, since it will re-run FLUSH PRIVILEGES when it receives the etcd notification)
  • Increased code complexity (or actually decreased when you consider test simplification)

Related changes

  • Need to be included in the release note

This change is Reviewable

domain: run FLUSH PRIVILEGES synchronous on GRANT
MySQL compatible behavior.
@morgo

This comment has been minimized.

Copy link
Member

morgo commented Dec 29, 2018

/run-all-tests

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

tiancaiamao commented Dec 30, 2018

LGTM

@lonng

lonng approved these changes Dec 31, 2018

Copy link
Member

lonng left a comment

LGTM

@lonng lonng added status/LGT2 and removed status/LGT1 labels Dec 31, 2018

@morgo morgo merged commit 8e4d18a into pingcap:master Dec 31, 2018

12 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@morgo morgo deleted the morgo:flush branch Dec 31, 2018

lamxTyler added a commit to lamxTyler/tidb that referenced this pull request Jan 2, 2019

yu34po added a commit to yu34po/tidb that referenced this pull request Jan 2, 2019

@morgo morgo restored the morgo:flush branch Jan 4, 2019

morgo added a commit to morgo/tidb that referenced this pull request Jan 4, 2019

@morgo morgo deleted the morgo:flush branch Jan 4, 2019

ngaut added a commit that referenced this pull request Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment