{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/comments/90374818","pull_request_review_id":10893879,"id":90374818,"diff_hunk":"@@ -56,6 +56,9 @@ func (d Driver) Open(path string) (kv.Storage, error) {\n \n \tpdCli, err := pd.NewClient(etcdAddrs)\n \tif err != nil {\n+\t\tif strings.Contains(err.Error(), \"i/o timeout\") {\n+\t\t\treturn nil, errors.Annotate(errors.Trace(err), \"try again later\")","path":"store/tikv/kv.go","position":5,"original_position":5,"commit_id":"ac497daf275060386687fbf59fb90e68d557e43a","original_commit_id":"ac497daf275060386687fbf59fb90e68d557e43a","user":{"login":"disksing","id":12077877,"avatar_url":"https://avatars.githubusercontent.com/u/12077877?v=3","gravatar_id":"","url":"https://api.github.com/users/disksing","html_url":"https://github.com/disksing","followers_url":"https://api.github.com/users/disksing/followers","following_url":"https://api.github.com/users/disksing/following{/other_user}","gists_url":"https://api.github.com/users/disksing/gists{/gist_id}","starred_url":"https://api.github.com/users/disksing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disksing/subscriptions","organizations_url":"https://api.github.com/users/disksing/orgs","repos_url":"https://api.github.com/users/disksing/repos","events_url":"https://api.github.com/users/disksing/events{/privacy}","received_events_url":"https://api.github.com/users/disksing/received_events","type":"User","site_admin":false},"body":"BTW, when use `errors.Annotate`, you don't need to `errors.Trace`.","created_at":"2016-12-01T02:52:18Z","updated_at":"2016-12-01T02:52:18Z","html_url":"https://github.com/pingcap/tidb/pull/2122#discussion_r90374818","pull_request_url":"https://api.github.com/repos/pingcap/tidb/pulls/2122","_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments/90374818"},"html":{"href":"https://github.com/pingcap/tidb/pull/2122#discussion_r90374818"},"pull_request":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/2122"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/2122","id":95621974,"html_url":"https://github.com/pingcap/tidb/pull/2122","diff_url":"https://github.com/pingcap/tidb/pull/2122.diff","patch_url":"https://github.com/pingcap/tidb/pull/2122.patch","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/2122","number":2122,"state":"open","locked":false,"title":"tidb:fix retry open store","user":{"login":"nolouch","id":6428910,"avatar_url":"https://avatars.githubusercontent.com/u/6428910?v=3","gravatar_id":"","url":"https://api.github.com/users/nolouch","html_url":"https://github.com/nolouch","followers_url":"https://api.github.com/users/nolouch/followers","following_url":"https://api.github.com/users/nolouch/following{/other_user}","gists_url":"https://api.github.com/users/nolouch/gists{/gist_id}","starred_url":"https://api.github.com/users/nolouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolouch/subscriptions","organizations_url":"https://api.github.com/users/nolouch/orgs","repos_url":"https://api.github.com/users/nolouch/repos","events_url":"https://api.github.com/users/nolouch/events{/privacy}","received_events_url":"https://api.github.com/users/nolouch/received_events","type":"User","site_admin":false},"body":"Ref https://github.com/pingcap/pd/pull/391 now PD restart spend more time to get the leader.\r\n\r\n`kv.IsRetryableError` not work for  the error return by `driver.Open` , I think we can simply let it be true.\r\n\r\n```\r\n2016/11/29 11:27:22 printer.go:34: [info] UTC Build Time:  2016-11-29 01:59:37\r\n2016/11/29 11:27:22 client.go:52: [info] [pd] create pd client with endpoints [127.0.0.1:52379]\r\n2016/11/29 11:27:22 conn.go:67: [warning] failed to get leader from [http://127.0.0.1:52379] \r\n2016/11/29 11:27:23 main.go:155: [fatal] github.com/pingcap/pd/pd-client/rpc_worker.go:361: [pd] rpc failed: read tcp 127.0.0.1:35656->127.0.0.1:52379: i/o timeout\r\ngithub.com/pingcap/pd/pd-client/rpc_worker.go:249: \r\ngithub.com/pingcap/pd/pd-client/rpc_worker.go:227: \r\ngithub.com/pingcap/pd/pd-client/rpc_worker.go:77: \r\ngithub.com/pingcap/pd/pd-client/client.go:55: \r\n/data/jenkins/workspace/BENCH_TEST_ON_UCLOUD/go/src/github.com/pingcap/tidb/store/tikv/kv.go:59: \r\n/data/jenkins/workspace/BENCH_TEST_ON_UCLOUD/go/src/github.com/pingcap/tidb/tidb.go:220: \r\n","created_at":"2016-11-29T03:49:11Z","updated_at":"2016-12-01T02:52:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4e933ea6688997992ad6303deac11aec44ee939","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/tidb/pulls/2122/commits","review_comments_url":"https://api.github.com/repos/pingcap/tidb/pulls/2122/comments","review_comment_url":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/2122/comments","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/ac497daf275060386687fbf59fb90e68d557e43a","head":{"label":"pingcap:shuning/retry-tikv-open","ref":"shuning/retry-tikv-open","sha":"ac497daf275060386687fbf59fb90e68d557e43a","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","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,"name":"tidb","full_name":"pingcap/tidb","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","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},"private":false,"html_url":"https://github.com/pingcap/tidb","description":"TiDB is a distributed NewSQL database compatible with 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":"2016-12-01T00:50:23Z","pushed_at":"2016-11-30T16:24:23Z","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":"","size":28844,"stargazers_count":5355,"watchers_count":5355,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":688,"mirror_url":null,"open_issues_count":131,"forks":688,"open_issues":131,"watchers":5355,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"36a16d3ee80096edb1b75fe14dbcc7d781f7558f","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","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,"name":"tidb","full_name":"pingcap/tidb","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","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},"private":false,"html_url":"https://github.com/pingcap/tidb","description":"TiDB is a distributed NewSQL database compatible with 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":"2016-12-01T00:50:23Z","pushed_at":"2016-11-30T16:24:23Z","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":"","size":28844,"stargazers_count":5355,"watchers_count":5355,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":688,"mirror_url":null,"open_issues_count":131,"forks":688,"open_issues":131,"watchers":5355,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/2122"},"html":{"href":"https://github.com/pingcap/tidb/pull/2122"},"issue":{"href":"https://api.github.com/repos/pingcap/tidb/issues/2122"},"comments":{"href":"https://api.github.com/repos/pingcap/tidb/issues/2122/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/2122/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/2122/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/tidb/statuses/ac497daf275060386687fbf59fb90e68d557e43a"}}}}
{"actor":{"display_login":"disksing"}}