{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/pd/pulls/comments/62785256","id":62785256,"diff_hunk":"@@ -98,84 +98,115 @@ func (c *conn) getRaftCluster() (*raftCluster, error) {\n \treturn cluster, nil\n }\n \n-func (c *conn) handleGetMeta(req *pdpb.Request) (*pdpb.Response, error) {\n-\trequest := req.GetGetMeta()\n+func (c *conn) handleGetStore(req *pdpb.Request) (*pdpb.Response, error) {\n+\trequest := req.GetGetStore()\n \tif request == nil {\n-\t\treturn nil, errors.Errorf(\"invalid get meta command, but %v\", req)\n+\t\treturn nil, errors.Errorf(\"invalid get store command, but %v\", req)\n \t}\n \n \tcluster, err := c.getRaftCluster()\n \tif err != nil {\n \t\treturn nil, errors.Trace(err)\n \t}\n \n-\tresp := &pdpb.GetMetaResponse{\n-\t\tMetaType: request.MetaType,\n+\tstoreID := request.GetStoreId()\n+\tstore, err := cluster.GetStore(storeID)\n+\tif err != nil {\n+\t\treturn nil, errors.Trace(err)\n \t}\n+\t// Store may be nil, should we return an error instead of none result?","path":"server/command.go","position":25,"original_position":25,"commit_id":"5c15174505954c7eb46cdef968f8a4ac6dcf3fc3","original_commit_id":"5c15174505954c7eb46cdef968f8a4ac6dcf3fc3","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":"I think remove this comment is enough. @siddontang What do you suggest?","created_at":"2016-05-11T02:46:28Z","updated_at":"2016-05-11T02:46:28Z","html_url":"https://github.com/pingcap/pd/pull/99#discussion_r62785256","pull_request_url":"https://api.github.com/repos/pingcap/pd/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/pingcap/pd/pulls/comments/62785256"},"html":{"href":"https://github.com/pingcap/pd/pull/99#discussion_r62785256"},"pull_request":{"href":"https://api.github.com/repos/pingcap/pd/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/pd/pulls/99","id":69163584,"html_url":"https://github.com/pingcap/pd/pull/99","diff_url":"https://github.com/pingcap/pd/pull/99.diff","patch_url":"https://github.com/pingcap/pd/pull/99.patch","issue_url":"https://api.github.com/repos/pingcap/pd/issues/99","number":99,"state":"open","locked":false,"title":"[DNM] *: split meta request to store/region/config","user":{"login":"tiancaiamao","id":1420062,"avatar_url":"https://avatars.githubusercontent.com/u/1420062?v=3","gravatar_id":"","url":"https://api.github.com/users/tiancaiamao","html_url":"https://github.com/tiancaiamao","followers_url":"https://api.github.com/users/tiancaiamao/followers","following_url":"https://api.github.com/users/tiancaiamao/following{/other_user}","gists_url":"https://api.github.com/users/tiancaiamao/gists{/gist_id}","starred_url":"https://api.github.com/users/tiancaiamao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiancaiamao/subscriptions","organizations_url":"https://api.github.com/users/tiancaiamao/orgs","repos_url":"https://api.github.com/users/tiancaiamao/repos","events_url":"https://api.github.com/users/tiancaiamao/events{/privacy}","received_events_url":"https://api.github.com/users/tiancaiamao/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-06T15:01:19Z","updated_at":"2016-05-11T02:46:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8831a22e56a5e34d75b848baab975a0688a57f2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/pd/pulls/99/commits","review_comments_url":"https://api.github.com/repos/pingcap/pd/pulls/99/comments","review_comment_url":"https://api.github.com/repos/pingcap/pd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/pd/issues/99/comments","statuses_url":"https://api.github.com/repos/pingcap/pd/statuses/5c15174505954c7eb46cdef968f8a4ac6dcf3fc3","head":{"label":"pingcap:tiancaiamao/split-meta-request","ref":"tiancaiamao/split-meta-request","sha":"5c15174505954c7eb46cdef968f8a4ac6dcf3fc3","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":53311716,"name":"pd","full_name":"pingcap/pd","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/pd","description":"Placement driver for TiKV","fork":false,"url":"https://api.github.com/repos/pingcap/pd","forks_url":"https://api.github.com/repos/pingcap/pd/forks","keys_url":"https://api.github.com/repos/pingcap/pd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/pd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/pd/teams","hooks_url":"https://api.github.com/repos/pingcap/pd/hooks","issue_events_url":"https://api.github.com/repos/pingcap/pd/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/pd/events","assignees_url":"https://api.github.com/repos/pingcap/pd/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/pd/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/pd/tags","blobs_url":"https://api.github.com/repos/pingcap/pd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/pd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/pd/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/pd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/pd/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/pd/languages","stargazers_url":"https://api.github.com/repos/pingcap/pd/stargazers","contributors_url":"https://api.github.com/repos/pingcap/pd/contributors","subscribers_url":"https://api.github.com/repos/pingcap/pd/subscribers","subscription_url":"https://api.github.com/repos/pingcap/pd/subscription","commits_url":"https://api.github.com/repos/pingcap/pd/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/pd/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/pd/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/pd/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/pd/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/pd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/pd/merges","archive_url":"https://api.github.com/repos/pingcap/pd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/pd/downloads","issues_url":"https://api.github.com/repos/pingcap/pd/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/pd/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/pd/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/pd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/pd/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/pd/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/pd/deployments","created_at":"2016-03-07T09:13:06Z","updated_at":"2016-05-06T03:30:31Z","pushed_at":"2016-05-11T02:43:34Z","git_url":"git://github.com/pingcap/pd.git","ssh_url":"git@github.com:pingcap/pd.git","clone_url":"https://github.com/pingcap/pd.git","svn_url":"https://github.com/pingcap/pd","homepage":"","size":828,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":10,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"edf629fd557dc8641b718a28fbdc2bb624c83544","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":53311716,"name":"pd","full_name":"pingcap/pd","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/pd","description":"Placement driver for TiKV","fork":false,"url":"https://api.github.com/repos/pingcap/pd","forks_url":"https://api.github.com/repos/pingcap/pd/forks","keys_url":"https://api.github.com/repos/pingcap/pd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/pd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/pd/teams","hooks_url":"https://api.github.com/repos/pingcap/pd/hooks","issue_events_url":"https://api.github.com/repos/pingcap/pd/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/pd/events","assignees_url":"https://api.github.com/repos/pingcap/pd/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/pd/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/pd/tags","blobs_url":"https://api.github.com/repos/pingcap/pd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/pd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/pd/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/pd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/pd/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/pd/languages","stargazers_url":"https://api.github.com/repos/pingcap/pd/stargazers","contributors_url":"https://api.github.com/repos/pingcap/pd/contributors","subscribers_url":"https://api.github.com/repos/pingcap/pd/subscribers","subscription_url":"https://api.github.com/repos/pingcap/pd/subscription","commits_url":"https://api.github.com/repos/pingcap/pd/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/pd/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/pd/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/pd/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/pd/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/pd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/pd/merges","archive_url":"https://api.github.com/repos/pingcap/pd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/pd/downloads","issues_url":"https://api.github.com/repos/pingcap/pd/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/pd/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/pd/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/pd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/pd/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/pd/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/pd/deployments","created_at":"2016-03-07T09:13:06Z","updated_at":"2016-05-06T03:30:31Z","pushed_at":"2016-05-11T02:43:34Z","git_url":"git://github.com/pingcap/pd.git","ssh_url":"git@github.com:pingcap/pd.git","clone_url":"https://github.com/pingcap/pd.git","svn_url":"https://github.com/pingcap/pd","homepage":"","size":828,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/pd/pulls/99"},"html":{"href":"https://github.com/pingcap/pd/pull/99"},"issue":{"href":"https://api.github.com/repos/pingcap/pd/issues/99"},"comments":{"href":"https://api.github.com/repos/pingcap/pd/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/pd/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/pd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/pd/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/pd/statuses/5c15174505954c7eb46cdef968f8a4ac6dcf3fc3"}}}}