{"action":"created","comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/27828379","id":27828379,"diff_hunk":"@@ -266,7 +265,8 @@ func (ds *DistSender) sendRPC(desc *proto.RangeDescriptor, method string, args p\n \t}\n \n \t// Build a slice of replica addresses (if gossiped).\n-\tvar addrs []net.Addr\n+\t// A node may have multiple stores, so the addr of store should include net addr and storeID\n+\tvar addrs []rpc.StoreAddr\n \treplicaMap := map[string]*proto.Replica{}","path":"kv/dist_sender.go","position":15,"original_position":15,"commit_id":"2b4d2357d9bea220517c3706355982680c59ace1","original_commit_id":"2b4d2357d9bea220517c3706355982680c59ace1","user":{"login":"spencerkimball","id":6147149,"avatar_url":"https://avatars.githubusercontent.com/u/6147149?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerkimball","html_url":"https://github.com/spencerkimball","followers_url":"https://api.github.com/users/spencerkimball/followers","following_url":"https://api.github.com/users/spencerkimball/following{/other_user}","gists_url":"https://api.github.com/users/spencerkimball/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerkimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerkimball/subscriptions","organizations_url":"https://api.github.com/users/spencerkimball/orgs","repos_url":"https://api.github.com/users/spencerkimball/repos","events_url":"https://api.github.com/users/spencerkimball/events{/privacy}","received_events_url":"https://api.github.com/users/spencerkimball/received_events","type":"User","site_admin":false},"body":"Let's change replicaMap to be a map from StoreID => *proto.Replica. This will be a lot more efficient than generating the string representation of the inet address and concatenating store ID.\r\n\r\n    replicaMap := map[int32]*proto.Replica{}\r\n\r\nThis further means that you will no longer need the StoreAddr.String() method and the getArg() method can just accept the StoreID, not the StoreAddr. This in turn will remove the need for the storeClient.getStoreAddr() method.","created_at":"2015-04-06T20:43:33Z","updated_at":"2015-04-06T20:43:33Z","html_url":"https://github.com/cockroachdb/cockroach/pull/574#discussion_r27828379","pull_request_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574","_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/27828379"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/574#discussion_r27828379"},"pull_request":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574"}}},"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574","id":32641942,"html_url":"https://github.com/cockroachdb/cockroach/pull/574","diff_url":"https://github.com/cockroachdb/cockroach/pull/574.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/574.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/574","number":574,"state":"open","locked":false,"title":"Bugfix for sendRPC can't support multi-stores of one node","user":{"login":"Frank-Jin","id":7114592,"avatar_url":"https://avatars.githubusercontent.com/u/7114592?v=3","gravatar_id":"","url":"https://api.github.com/users/Frank-Jin","html_url":"https://github.com/Frank-Jin","followers_url":"https://api.github.com/users/Frank-Jin/followers","following_url":"https://api.github.com/users/Frank-Jin/following{/other_user}","gists_url":"https://api.github.com/users/Frank-Jin/gists{/gist_id}","starred_url":"https://api.github.com/users/Frank-Jin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frank-Jin/subscriptions","organizations_url":"https://api.github.com/users/Frank-Jin/orgs","repos_url":"https://api.github.com/users/Frank-Jin/repos","events_url":"https://api.github.com/users/Frank-Jin/events{/privacy}","received_events_url":"https://api.github.com/users/Frank-Jin/received_events","type":"User","site_admin":false},"body":"       One node may have serval stores, but kv/dist_send.go uses the net address to identify the replica that can only support one store in a node. \r\n       I hope to know if the way of my modification is suitable first, so I have not finish the testing code.","created_at":"2015-04-05T00:32:52Z","updated_at":"2015-04-06T20:43:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a099416b9a1f81b9722122cf606bf8ec9d6bff5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/574/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/2b4d2357d9bea220517c3706355982680c59ace1","head":{"label":"Frank-Jin:master","ref":"master","sha":"2b4d2357d9bea220517c3706355982680c59ace1","user":{"login":"Frank-Jin","id":7114592,"avatar_url":"https://avatars.githubusercontent.com/u/7114592?v=3","gravatar_id":"","url":"https://api.github.com/users/Frank-Jin","html_url":"https://github.com/Frank-Jin","followers_url":"https://api.github.com/users/Frank-Jin/followers","following_url":"https://api.github.com/users/Frank-Jin/following{/other_user}","gists_url":"https://api.github.com/users/Frank-Jin/gists{/gist_id}","starred_url":"https://api.github.com/users/Frank-Jin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frank-Jin/subscriptions","organizations_url":"https://api.github.com/users/Frank-Jin/orgs","repos_url":"https://api.github.com/users/Frank-Jin/repos","events_url":"https://api.github.com/users/Frank-Jin/events{/privacy}","received_events_url":"https://api.github.com/users/Frank-Jin/received_events","type":"User","site_admin":false},"repo":{"id":33424011,"name":"cockroach","full_name":"Frank-Jin/cockroach","owner":{"login":"Frank-Jin","id":7114592,"avatar_url":"https://avatars.githubusercontent.com/u/7114592?v=3","gravatar_id":"","url":"https://api.github.com/users/Frank-Jin","html_url":"https://github.com/Frank-Jin","followers_url":"https://api.github.com/users/Frank-Jin/followers","following_url":"https://api.github.com/users/Frank-Jin/following{/other_user}","gists_url":"https://api.github.com/users/Frank-Jin/gists{/gist_id}","starred_url":"https://api.github.com/users/Frank-Jin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frank-Jin/subscriptions","organizations_url":"https://api.github.com/users/Frank-Jin/orgs","repos_url":"https://api.github.com/users/Frank-Jin/repos","events_url":"https://api.github.com/users/Frank-Jin/events{/privacy}","received_events_url":"https://api.github.com/users/Frank-Jin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Frank-Jin/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":true,"url":"https://api.github.com/repos/Frank-Jin/cockroach","forks_url":"https://api.github.com/repos/Frank-Jin/cockroach/forks","keys_url":"https://api.github.com/repos/Frank-Jin/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Frank-Jin/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Frank-Jin/cockroach/teams","hooks_url":"https://api.github.com/repos/Frank-Jin/cockroach/hooks","issue_events_url":"https://api.github.com/repos/Frank-Jin/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/Frank-Jin/cockroach/events","assignees_url":"https://api.github.com/repos/Frank-Jin/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/Frank-Jin/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/Frank-Jin/cockroach/tags","blobs_url":"https://api.github.com/repos/Frank-Jin/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Frank-Jin/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Frank-Jin/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/Frank-Jin/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Frank-Jin/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/Frank-Jin/cockroach/languages","stargazers_url":"https://api.github.com/repos/Frank-Jin/cockroach/stargazers","contributors_url":"https://api.github.com/repos/Frank-Jin/cockroach/contributors","subscribers_url":"https://api.github.com/repos/Frank-Jin/cockroach/subscribers","subscription_url":"https://api.github.com/repos/Frank-Jin/cockroach/subscription","commits_url":"https://api.github.com/repos/Frank-Jin/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/Frank-Jin/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/Frank-Jin/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/Frank-Jin/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/Frank-Jin/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/Frank-Jin/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Frank-Jin/cockroach/merges","archive_url":"https://api.github.com/repos/Frank-Jin/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Frank-Jin/cockroach/downloads","issues_url":"https://api.github.com/repos/Frank-Jin/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/Frank-Jin/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/Frank-Jin/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/Frank-Jin/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Frank-Jin/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/Frank-Jin/cockroach/releases{/id}","created_at":"2015-04-04T23:34:53Z","updated_at":"2015-04-05T00:12:36Z","pushed_at":"2015-04-05T00:12:34Z","git_url":"git://github.com/Frank-Jin/cockroach.git","ssh_url":"git@github.com:Frank-Jin/cockroach.git","clone_url":"https://github.com/Frank-Jin/cockroach.git","svn_url":"https://github.com/Frank-Jin/cockroach","homepage":null,"size":11902,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cockroachdb:master","ref":"master","sha":"1f6221ecc557860738f6892771800d508727fdbb","user":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"repo":{"id":16563587,"name":"cockroach","full_name":"cockroachdb/cockroach","owner":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockroachdb/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":false,"url":"https://api.github.com/repos/cockroachdb/cockroach","forks_url":"https://api.github.com/repos/cockroachdb/cockroach/forks","keys_url":"https://api.github.com/repos/cockroachdb/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockroachdb/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockroachdb/cockroach/teams","hooks_url":"https://api.github.com/repos/cockroachdb/cockroach/hooks","issue_events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/cockroachdb/cockroach/events","assignees_url":"https://api.github.com/repos/cockroachdb/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/cockroachdb/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/cockroachdb/cockroach/tags","blobs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockroachdb/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockroachdb/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/cockroachdb/cockroach/languages","stargazers_url":"https://api.github.com/repos/cockroachdb/cockroach/stargazers","contributors_url":"https://api.github.com/repos/cockroachdb/cockroach/contributors","subscribers_url":"https://api.github.com/repos/cockroachdb/cockroach/subscribers","subscription_url":"https://api.github.com/repos/cockroachdb/cockroach/subscription","commits_url":"https://api.github.com/repos/cockroachdb/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockroachdb/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockroachdb/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/cockroachdb/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockroachdb/cockroach/merges","archive_url":"https://api.github.com/repos/cockroachdb/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockroachdb/cockroach/downloads","issues_url":"https://api.github.com/repos/cockroachdb/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/cockroachdb/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/cockroachdb/cockroach/releases{/id}","created_at":"2014-02-06T00:18:47Z","updated_at":"2015-04-06T20:39:27Z","pushed_at":"2015-04-06T20:39:27Z","git_url":"git://github.com/cockroachdb/cockroach.git","ssh_url":"git@github.com:cockroachdb/cockroach.git","clone_url":"https://github.com/cockroachdb/cockroach.git","svn_url":"https://github.com/cockroachdb/cockroach","homepage":null,"size":20039,"stargazers_count":3256,"watchers_count":3256,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":242,"mirror_url":null,"open_issues_count":43,"forks":242,"open_issues":43,"watchers":3256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/574"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/574"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/574/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/574/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroach/statuses/2b4d2357d9bea220517c3706355982680c59ace1"}}}}