{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/8287","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/8287/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/8287/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/8287/events","html_url":"https://github.com/pingcap/tidb/pull/8287","id":379877305,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMjExMTUx","number":8287,"title":"ddl: fix concurrent access to `do.infoHandle` has a data race error","user":{"login":"ciscoxll","id":20379978,"node_id":"MDQ6VXNlcjIwMzc5OTc4","avatar_url":"https://avatars0.githubusercontent.com/u/20379978?v=4","gravatar_id":"","url":"https://api.github.com/users/ciscoxll","html_url":"https://github.com/ciscoxll","followers_url":"https://api.github.com/users/ciscoxll/followers","following_url":"https://api.github.com/users/ciscoxll/following{/other_user}","gists_url":"https://api.github.com/users/ciscoxll/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoxll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoxll/subscriptions","organizations_url":"https://api.github.com/users/ciscoxll/orgs","repos_url":"https://api.github.com/users/ciscoxll/repos","events_url":"https://api.github.com/users/ciscoxll/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoxll/received_events","type":"User","site_admin":false},"labels":[{"id":745133021,"node_id":"MDU6TGFiZWw3NDUxMzMwMjE=","url":"https://api.github.com/repos/pingcap/tidb/labels/component/DDL-need-LGT3","name":"component/DDL-need-LGT3","color":"00bff4","default":false},{"id":770872605,"node_id":"MDU6TGFiZWw3NzA4NzI2MDU=","url":"https://api.github.com/repos/pingcap/tidb/labels/status/all%20tests%20passed","name":"status/all tests passed","color":"2cbe4e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-12T17:22:28Z","updated_at":"2018-11-14T04:05:45Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/8287","html_url":"https://github.com/pingcap/tidb/pull/8287","diff_url":"https://github.com/pingcap/tidb/pull/8287.diff","patch_url":"https://github.com/pingcap/tidb/pull/8287.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\n```go\r\nWARNING: DATA RACE\r\nWrite at 0x00c0001d4c70 by goroutine 51:\r\n  github.com/pingcap/tidb/ddl_test.(*testFailDBSuite).TestHalfwayCancelOperations()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:538 +0x1c80\r\n  github.com/pingcap/tidb/ddl_test.(*testFailDBSuite).TestHalfwayCancelOperations()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/ddl/fail_db_test.go:125 +0x1adb\r\n  github.com/pingcap/tidb/ddl_test.(*testFailDBSuite).TestHalfwayCancelOperations()\r\n\r\n github.com/pingcap/tidb/ddl_test.(*testFailDBSuite).TestHalfwayCancelOperations()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/ddl/fail_db_test.go:69 +0x70\r\n  runtime.call32()\r\n      /usr/local/go/src/runtime/asm_amd64.s:522 +0x3a\r\n  reflect.Value.Call()\r\n      /usr/local/go/src/reflect/value.go:308 +0xc0\r\n  github.com/pingcap/check.(*suiteRunner).forkTest.func1()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/check@v0.0.0-20171206051426-1c287c953996/check.go:798 +0xa04\r\n  github.com/pingcap/check.(*suiteRunner).forkCall.func1()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/check@v0.0.0-20171206051426-1c287c953996/check.go:692 +0x89\r\n\r\nPrevious read at 0x00c0001d4c70 by goroutine 179:\r\n  github.com/pingcap/tidb/domain.(*Domain).Reload()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:304 +0x151\r\n  github.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop()\r\n      /home/jenkins/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:401 +0x7f1\r\n```\r\n\r\n### What is changed and how it works?\r\n\r\n* Data race error when concurrently accessing do.infoHandle in this [PR test](https://github.com/pingcap/tidb/pull/7997/files#diff-46dccda7ce1de403b0cda3709f1ce5ceR537).\r\n* So here is the atomic pointer operation on do.infoHandle.\r\n\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\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/438530203","html_url":"https://github.com/pingcap/tidb/pull/8287#issuecomment-438530203","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/8287","id":438530203,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODUzMDIwMw==","user":{"login":"winkyao","id":6949944,"node_id":"MDQ6VXNlcjY5NDk5NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6949944?v=4","gravatar_id":"","url":"https://api.github.com/users/winkyao","html_url":"https://github.com/winkyao","followers_url":"https://api.github.com/users/winkyao/followers","following_url":"https://api.github.com/users/winkyao/following{/other_user}","gists_url":"https://api.github.com/users/winkyao/gists{/gist_id}","starred_url":"https://api.github.com/users/winkyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winkyao/subscriptions","organizations_url":"https://api.github.com/users/winkyao/orgs","repos_url":"https://api.github.com/users/winkyao/repos","events_url":"https://api.github.com/users/winkyao/events{/privacy}","received_events_url":"https://api.github.com/users/winkyao/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T04:05:45Z","updated_at":"2018-11-14T04:05:45Z","author_association":"MEMBER","body":"/run-integration-common-test"}}
{"actor":{"display_login":"winkyao"}}