{"action":"opened","number":8504,"pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/8504","id":234496435,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NDk2NDM1","html_url":"https://github.com/pingcap/tidb/pull/8504","diff_url":"https://github.com/pingcap/tidb/pull/8504.diff","patch_url":"https://github.com/pingcap/tidb/pull/8504.patch","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/8504","number":8504,"state":"open","locked":false,"title":"ddl: fix cancel drop index error","user":{"login":"crazycs520","id":26020263,"node_id":"MDQ6VXNlcjI2MDIwMjYz","avatar_url":"https://avatars2.githubusercontent.com/u/26020263?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycs520","html_url":"https://github.com/crazycs520","followers_url":"https://api.github.com/users/crazycs520/followers","following_url":"https://api.github.com/users/crazycs520/following{/other_user}","gists_url":"https://api.github.com/users/crazycs520/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycs520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycs520/subscriptions","organizations_url":"https://api.github.com/users/crazycs520/orgs","repos_url":"https://api.github.com/users/crazycs520/repos","events_url":"https://api.github.com/users/crazycs520/events{/privacy}","received_events_url":"https://api.github.com/users/crazycs520/received_events","type":"User","site_admin":false},"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\nreleate PR #8171 \r\nThis PR make cancel drop index work correctly. Old tidb version cancel drop index may cause the index states neither on `StatePublic` nor `StateNone`. For client, the index is not visible, but client add index with the same name will fail because the name of 'xxx' index is already exists.\r\n\r\n### What is changed and how it works?\r\nWe can only cancel drop index job when the index state is on `StatePublic` or `StateWriteOnly`, otherwise, cancel index and make the index state rollback to public may cause data consistency.\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\nCode changes\r\n\r\n - Has exported function/method change\r\n\r\nSide effects\r\n\r\n - Increased code complexity\r\n\r\nRelated changes\r\n\r\n - Need to cherry-pick to the release branch\r\n","created_at":"2018-11-29T03:21:29Z","updated_at":"2018-11-29T03:21:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/tidb/pulls/8504/commits","review_comments_url":"https://api.github.com/repos/pingcap/tidb/pulls/8504/comments","review_comment_url":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/8504/comments","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/d8f4f56de52ea23658526239131a21e5c8043373","head":{"label":"crazycs520:fix-cancel","ref":"fix-cancel","sha":"d8f4f56de52ea23658526239131a21e5c8043373","user":{"login":"crazycs520","id":26020263,"node_id":"MDQ6VXNlcjI2MDIwMjYz","avatar_url":"https://avatars2.githubusercontent.com/u/26020263?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycs520","html_url":"https://github.com/crazycs520","followers_url":"https://api.github.com/users/crazycs520/followers","following_url":"https://api.github.com/users/crazycs520/following{/other_user}","gists_url":"https://api.github.com/users/crazycs520/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycs520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycs520/subscriptions","organizations_url":"https://api.github.com/users/crazycs520/orgs","repos_url":"https://api.github.com/users/crazycs520/repos","events_url":"https://api.github.com/users/crazycs520/events{/privacy}","received_events_url":"https://api.github.com/users/crazycs520/received_events","type":"User","site_admin":false},"repo":{"id":136926865,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5MjY4NjU=","name":"tidb","full_name":"crazycs520/tidb","private":false,"owner":{"login":"crazycs520","id":26020263,"node_id":"MDQ6VXNlcjI2MDIwMjYz","avatar_url":"https://avatars2.githubusercontent.com/u/26020263?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycs520","html_url":"https://github.com/crazycs520","followers_url":"https://api.github.com/users/crazycs520/followers","following_url":"https://api.github.com/users/crazycs520/following{/other_user}","gists_url":"https://api.github.com/users/crazycs520/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycs520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycs520/subscriptions","organizations_url":"https://api.github.com/users/crazycs520/orgs","repos_url":"https://api.github.com/users/crazycs520/repos","events_url":"https://api.github.com/users/crazycs520/events{/privacy}","received_events_url":"https://api.github.com/users/crazycs520/received_events","type":"User","site_admin":false},"html_url":"https://github.com/crazycs520/tidb","description":"TiDB is a distributed HTAP database compatible with the MySQL protocol ","fork":true,"url":"https://api.github.com/repos/crazycs520/tidb","forks_url":"https://api.github.com/repos/crazycs520/tidb/forks","keys_url":"https://api.github.com/repos/crazycs520/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crazycs520/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crazycs520/tidb/teams","hooks_url":"https://api.github.com/repos/crazycs520/tidb/hooks","issue_events_url":"https://api.github.com/repos/crazycs520/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/crazycs520/tidb/events","assignees_url":"https://api.github.com/repos/crazycs520/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/crazycs520/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/crazycs520/tidb/tags","blobs_url":"https://api.github.com/repos/crazycs520/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crazycs520/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crazycs520/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/crazycs520/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crazycs520/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/crazycs520/tidb/languages","stargazers_url":"https://api.github.com/repos/crazycs520/tidb/stargazers","contributors_url":"https://api.github.com/repos/crazycs520/tidb/contributors","subscribers_url":"https://api.github.com/repos/crazycs520/tidb/subscribers","subscription_url":"https://api.github.com/repos/crazycs520/tidb/subscription","commits_url":"https://api.github.com/repos/crazycs520/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/crazycs520/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/crazycs520/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/crazycs520/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/crazycs520/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/crazycs520/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crazycs520/tidb/merges","archive_url":"https://api.github.com/repos/crazycs520/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crazycs520/tidb/downloads","issues_url":"https://api.github.com/repos/crazycs520/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/crazycs520/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/crazycs520/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/crazycs520/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crazycs520/tidb/labels{/name}","releases_url":"https://api.github.com/repos/crazycs520/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/crazycs520/tidb/deployments","created_at":"2018-06-11T13:00:28Z","updated_at":"2018-06-11T13:00:33Z","pushed_at":"2018-11-29T03:13:29Z","git_url":"git://github.com/crazycs520/tidb.git","ssh_url":"git@github.com:crazycs520/tidb.git","clone_url":"https://github.com/crazycs520/tidb.git","svn_url":"https://github.com/crazycs520/tidb","homepage":"https://pingcap.com","size":66160,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"9579be1e794d31bfb8068ea9803db2f5ed8b1c82","user":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":41986369,"node_id":"MDEwOlJlcG9zaXRvcnk0MTk4NjM2OQ==","name":"tidb","full_name":"pingcap/tidb","private":false,"owner":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pingcap/tidb","description":"TiDB is a distributed HTAP database compatible with the MySQL protocol ","fork":false,"url":"https://api.github.com/repos/pingcap/tidb","forks_url":"https://api.github.com/repos/pingcap/tidb/forks","keys_url":"https://api.github.com/repos/pingcap/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/tidb/teams","hooks_url":"https://api.github.com/repos/pingcap/tidb/hooks","issue_events_url":"https://api.github.com/repos/pingcap/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/tidb/events","assignees_url":"https://api.github.com/repos/pingcap/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/tidb/tags","blobs_url":"https://api.github.com/repos/pingcap/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/tidb/languages","stargazers_url":"https://api.github.com/repos/pingcap/tidb/stargazers","contributors_url":"https://api.github.com/repos/pingcap/tidb/contributors","subscribers_url":"https://api.github.com/repos/pingcap/tidb/subscribers","subscription_url":"https://api.github.com/repos/pingcap/tidb/subscription","commits_url":"https://api.github.com/repos/pingcap/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/tidb/merges","archive_url":"https://api.github.com/repos/pingcap/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/tidb/downloads","issues_url":"https://api.github.com/repos/pingcap/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/tidb/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/tidb/deployments","created_at":"2015-09-06T04:01:52Z","updated_at":"2018-11-29T03:04:24Z","pushed_at":"2018-11-29T03:14:44Z","git_url":"git://github.com/pingcap/tidb.git","ssh_url":"git@github.com:pingcap/tidb.git","clone_url":"https://github.com/pingcap/tidb.git","svn_url":"https://github.com/pingcap/tidb","homepage":"https://pingcap.com","size":94654,"stargazers_count":16108,"watchers_count":16108,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2280,"mirror_url":null,"archived":false,"open_issues_count":579,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2280,"open_issues":579,"watchers":16108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/8504"},"html":{"href":"https://github.com/pingcap/tidb/pull/8504"},"issue":{"href":"https://api.github.com/repos/pingcap/tidb/issues/8504"},"comments":{"href":"https://api.github.com/repos/pingcap/tidb/issues/8504/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/8504/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/8504/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/tidb/statuses/d8f4f56de52ea23658526239131a21e5c8043373"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":151,"deletions":0,"changed_files":4}}
{"actor":{"display_login":"crazycs520"}}