{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/8886","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/8886/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/8886/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/8886/events","html_url":"https://github.com/pingcap/tidb/pull/8886","id":394809553,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNDU1MTMz","number":8886,"title":"domain: run FLUSH PRIVILEGES synchronous on GRANT","user":{"login":"morgo","id":57982,"node_id":"MDQ6VXNlcjU3OTgy","avatar_url":"https://avatars2.githubusercontent.com/u/57982?v=4","gravatar_id":"","url":"https://api.github.com/users/morgo","html_url":"https://github.com/morgo","followers_url":"https://api.github.com/users/morgo/followers","following_url":"https://api.github.com/users/morgo/following{/other_user}","gists_url":"https://api.github.com/users/morgo/gists{/gist_id}","starred_url":"https://api.github.com/users/morgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgo/subscriptions","organizations_url":"https://api.github.com/users/morgo/orgs","repos_url":"https://api.github.com/users/morgo/repos","events_url":"https://api.github.com/users/morgo/events{/privacy}","received_events_url":"https://api.github.com/users/morgo/received_events","type":"User","site_admin":false},"labels":[{"id":1034225797,"node_id":"MDU6TGFiZWwxMDM0MjI1Nzk3","url":"https://api.github.com/repos/pingcap/tidb/labels/component/privilege","name":"component/privilege","color":"81d5e2","default":false},{"id":541179553,"node_id":"MDU6TGFiZWw1NDExNzk1NTM=","url":"https://api.github.com/repos/pingcap/tidb/labels/type/compatibility","name":"type/compatibility","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-29T16:52:29Z","updated_at":"2018-12-29T17:54:52Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/8886","html_url":"https://github.com/pingcap/tidb/pull/8886","diff_url":"https://github.com/pingcap/tidb/pull/8886.diff","patch_url":"https://github.com/pingcap/tidb/pull/8886.patch"},"body":"<!--\r\nThank you for contributing to TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.\r\n-->\r\n\r\n### What problem does this PR solve? <!--add issue link with summary if exists-->\r\n\r\nFixes #8427\r\n\r\n### What is changed and how it works?\r\n\r\nWhen 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.\r\n\r\n### Check List <!--REMOVE the items that are not applicable-->\r\n\r\nTests <!-- At least one of them must be included. -->\r\n\r\n - Unit test\r\n - Manual test (add detailed scripts or steps below)\r\n\r\nCode changes\r\n\r\n- Yes\r\n\r\nSide effects\r\n\r\n - Possible performance regression (the server will do more work, since it will re-run `FLUSH PRIVILEGES` when it receives the etcd notification)\r\n - Increased code complexity (or actually decreased when you consider test simplification)\r\n\r\nRelated changes\r\n\r\n - Need to be included in the release note\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/pingcap/tidb/8886)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/450509304","html_url":"https://github.com/pingcap/tidb/pull/8886#issuecomment-450509304","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/8886","id":450509304,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDUwOTMwNA==","user":{"login":"morgo","id":57982,"node_id":"MDQ6VXNlcjU3OTgy","avatar_url":"https://avatars2.githubusercontent.com/u/57982?v=4","gravatar_id":"","url":"https://api.github.com/users/morgo","html_url":"https://github.com/morgo","followers_url":"https://api.github.com/users/morgo/followers","following_url":"https://api.github.com/users/morgo/following{/other_user}","gists_url":"https://api.github.com/users/morgo/gists{/gist_id}","starred_url":"https://api.github.com/users/morgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgo/subscriptions","organizations_url":"https://api.github.com/users/morgo/orgs","repos_url":"https://api.github.com/users/morgo/repos","events_url":"https://api.github.com/users/morgo/events{/privacy}","received_events_url":"https://api.github.com/users/morgo/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T17:54:52Z","updated_at":"2018-12-29T17:54:52Z","author_association":"MEMBER","body":"/run-all-tests"}}
{"actor":{"display_login":"morgo"}}