{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/176888567","pull_request_review_id":106669665,"id":176888567,"diff_hunk":"@@ -1155,11 +1161,12 @@ class KafkaController(val config: KafkaConfig, zkClient: KafkaZkClient, time: Ti\n       if (!isActive) {\n         0\n       } else {\n-        controllerContext.partitionReplicaAssignment.count { case (topicPartition, replicas) =>\n+        controllerContext.allPartitions.count { topicAndPartition =>","path":"core/src/main/scala/kafka/controller/KafkaController.scala","position":154,"original_position":154,"commit_id":"b2177a645798a5c5699b088f590bd15dcbed6b6d","original_commit_id":"b2177a645798a5c5699b088f590bd15dcbed6b6d","user":{"login":"junrao","id":132330,"avatar_url":"https://avatars2.githubusercontent.com/u/132330?v=4","gravatar_id":"","url":"https://api.github.com/users/junrao","html_url":"https://github.com/junrao","followers_url":"https://api.github.com/users/junrao/followers","following_url":"https://api.github.com/users/junrao/following{/other_user}","gists_url":"https://api.github.com/users/junrao/gists{/gist_id}","starred_url":"https://api.github.com/users/junrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junrao/subscriptions","organizations_url":"https://api.github.com/users/junrao/orgs","repos_url":"https://api.github.com/users/junrao/repos","events_url":"https://api.github.com/users/junrao/events{/privacy}","received_events_url":"https://api.github.com/users/junrao/received_events","type":"User","site_admin":false},"body":"topicAndPartition => topicPartition","created_at":"2018-03-23T23:42:37Z","updated_at":"2018-03-23T23:53:46Z","html_url":"https://github.com/apache/kafka/pull/4668#discussion_r176888567","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/4668","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/176888567"},"html":{"href":"https://github.com/apache/kafka/pull/4668#discussion_r176888567"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/4668"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/4668","id":173875039,"html_url":"https://github.com/apache/kafka/pull/4668","diff_url":"https://github.com/apache/kafka/pull/4668.diff","patch_url":"https://github.com/apache/kafka/pull/4668.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/4668","number":4668,"state":"open","locked":false,"title":"KAFKA-6630: Speed up the processing of TopicDeletionStopReplicaResponseReceived events on the controller","user":{"login":"gitlw","id":1738460,"avatar_url":"https://avatars0.githubusercontent.com/u/1738460?v=4","gravatar_id":"","url":"https://api.github.com/users/gitlw","html_url":"https://github.com/gitlw","followers_url":"https://api.github.com/users/gitlw/followers","following_url":"https://api.github.com/users/gitlw/following{/other_user}","gists_url":"https://api.github.com/users/gitlw/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlw/subscriptions","organizations_url":"https://api.github.com/users/gitlw/orgs","repos_url":"https://api.github.com/users/gitlw/repos","events_url":"https://api.github.com/users/gitlw/events{/privacy}","received_events_url":"https://api.github.com/users/gitlw/received_events","type":"User","site_admin":false},"body":"This patch tries to speed up the inefficient functions identified in Kafka-6630 by grouping partitions in the ControllerContext.partitionReplicaAssignment variable by topics. Hence trying to find all replicas for a topic won't need to go through all the replicas in the cluster.\r\n\r\nPassed all tests using \"gradle testAll\"\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-03-08T22:58:35Z","updated_at":"2018-03-23T23:53:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d80f92009b51d298a555e575e54e5a83bee48a61","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/4668/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/4668/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/4668/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/b2177a645798a5c5699b088f590bd15dcbed6b6d","head":{"label":"gitlw:speedup_processing_stop_replica_response","ref":"speedup_processing_stop_replica_response","sha":"b2177a645798a5c5699b088f590bd15dcbed6b6d","user":{"login":"gitlw","id":1738460,"avatar_url":"https://avatars0.githubusercontent.com/u/1738460?v=4","gravatar_id":"","url":"https://api.github.com/users/gitlw","html_url":"https://github.com/gitlw","followers_url":"https://api.github.com/users/gitlw/followers","following_url":"https://api.github.com/users/gitlw/following{/other_user}","gists_url":"https://api.github.com/users/gitlw/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlw/subscriptions","organizations_url":"https://api.github.com/users/gitlw/orgs","repos_url":"https://api.github.com/users/gitlw/repos","events_url":"https://api.github.com/users/gitlw/events{/privacy}","received_events_url":"https://api.github.com/users/gitlw/received_events","type":"User","site_admin":false},"repo":{"id":118698918,"name":"kafka","full_name":"gitlw/kafka","owner":{"login":"gitlw","id":1738460,"avatar_url":"https://avatars0.githubusercontent.com/u/1738460?v=4","gravatar_id":"","url":"https://api.github.com/users/gitlw","html_url":"https://github.com/gitlw","followers_url":"https://api.github.com/users/gitlw/followers","following_url":"https://api.github.com/users/gitlw/following{/other_user}","gists_url":"https://api.github.com/users/gitlw/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlw/subscriptions","organizations_url":"https://api.github.com/users/gitlw/orgs","repos_url":"https://api.github.com/users/gitlw/repos","events_url":"https://api.github.com/users/gitlw/events{/privacy}","received_events_url":"https://api.github.com/users/gitlw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gitlw/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/gitlw/kafka","forks_url":"https://api.github.com/repos/gitlw/kafka/forks","keys_url":"https://api.github.com/repos/gitlw/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlw/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlw/kafka/teams","hooks_url":"https://api.github.com/repos/gitlw/kafka/hooks","issue_events_url":"https://api.github.com/repos/gitlw/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/gitlw/kafka/events","assignees_url":"https://api.github.com/repos/gitlw/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/gitlw/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/gitlw/kafka/tags","blobs_url":"https://api.github.com/repos/gitlw/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlw/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlw/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlw/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlw/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlw/kafka/languages","stargazers_url":"https://api.github.com/repos/gitlw/kafka/stargazers","contributors_url":"https://api.github.com/repos/gitlw/kafka/contributors","subscribers_url":"https://api.github.com/repos/gitlw/kafka/subscribers","subscription_url":"https://api.github.com/repos/gitlw/kafka/subscription","commits_url":"https://api.github.com/repos/gitlw/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlw/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlw/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlw/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlw/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/gitlw/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlw/kafka/merges","archive_url":"https://api.github.com/repos/gitlw/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlw/kafka/downloads","issues_url":"https://api.github.com/repos/gitlw/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/gitlw/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlw/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlw/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlw/kafka/labels{/name}","releases_url":"https://api.github.com/repos/gitlw/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/gitlw/kafka/deployments","created_at":"2018-01-24T02:19:16Z","updated_at":"2018-01-24T02:19:26Z","pushed_at":"2018-03-23T23:27:44Z","git_url":"git://github.com/gitlw/kafka.git","ssh_url":"git@github.com:gitlw/kafka.git","clone_url":"https://github.com/gitlw/kafka.git","svn_url":"https://github.com/gitlw/kafka","homepage":null,"size":62850,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"989088f697a221bc2b7b1d0d0ae6e9d03b2bf8ac","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2018-03-23T17:03:34Z","pushed_at":"2018-03-23T23:48:05Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":63702,"stargazers_count":7765,"watchers_count":7765,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4607,"mirror_url":null,"archived":false,"open_issues_count":433,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4607,"open_issues":433,"watchers":7765,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/4668"},"html":{"href":"https://github.com/apache/kafka/pull/4668"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/4668"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/4668/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/4668/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/4668/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/b2177a645798a5c5699b088f590bd15dcbed6b6d"}},"author_association":"NONE"}}
{"actor":{"display_login":"junrao"}}