{"action":"opened","number":257,"pull_request":{"url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/257","id":79870084,"html_url":"https://github.com/zendesk/ruby-kafka/pull/257","diff_url":"https://github.com/zendesk/ruby-kafka/pull/257.diff","patch_url":"https://github.com/zendesk/ruby-kafka/pull/257.patch","issue_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/257","number":257,"state":"open","locked":false,"title":"Avoid calling the ListOffsets Kafka API for each assigned partition","user":{"login":"dasch","id":6351,"avatar_url":"https://avatars.githubusercontent.com/u/6351?v=3","gravatar_id":"","url":"https://api.github.com/users/dasch","html_url":"https://github.com/dasch","followers_url":"https://api.github.com/users/dasch/followers","following_url":"https://api.github.com/users/dasch/following{/other_user}","gists_url":"https://api.github.com/users/dasch/gists{/gist_id}","starred_url":"https://api.github.com/users/dasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasch/subscriptions","organizations_url":"https://api.github.com/users/dasch/orgs","repos_url":"https://api.github.com/users/dasch/repos","events_url":"https://api.github.com/users/dasch/events{/privacy}","received_events_url":"https://api.github.com/users/dasch/received_events","type":"User","site_admin":false},"body":"We've run into problems when a consumer is assigned a _lot_ of partitions – since the current code resolves the starting position for each partition in a separate Kafka API call, the consumer would exceed the session timeout doing those calls before being able to do any work. Since it would be kicked out of the group before being ready to commit those offsets, it would have to start over, causing an infinite loop of ListOffsets calls.\r\n\r\nThis change makes each consumer execute the minimum number of API calls to resolve the starting position for _all_ partitions in a given topic. It's possible to further optimize by having just a single call to each broker that queries across all topics, but that would complicate matters further right now.","created_at":"2016-08-03T08:57:07Z","updated_at":"2016-08-03T08:57:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66c6478e8a98fbb8190777c64a4e49dc5e1cf8f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/257/commits","review_comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/257/comments","review_comment_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/257/comments","statuses_url":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/a0b930054a9ec93021f11a7c814715a167a73de9","head":{"label":"zendesk:dasch/optimize-list-offset-calls","ref":"dasch/optimize-list-offset-calls","sha":"a0b930054a9ec93021f11a7c814715a167a73de9","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":49878403,"name":"ruby-kafka","full_name":"zendesk/ruby-kafka","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/ruby-kafka","description":"A Ruby client library for Apache Kafka 0.9","fork":false,"url":"https://api.github.com/repos/zendesk/ruby-kafka","forks_url":"https://api.github.com/repos/zendesk/ruby-kafka/forks","keys_url":"https://api.github.com/repos/zendesk/ruby-kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/ruby-kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/ruby-kafka/teams","hooks_url":"https://api.github.com/repos/zendesk/ruby-kafka/hooks","issue_events_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/ruby-kafka/events","assignees_url":"https://api.github.com/repos/zendesk/ruby-kafka/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/ruby-kafka/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/ruby-kafka/tags","blobs_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/ruby-kafka/languages","stargazers_url":"https://api.github.com/repos/zendesk/ruby-kafka/stargazers","contributors_url":"https://api.github.com/repos/zendesk/ruby-kafka/contributors","subscribers_url":"https://api.github.com/repos/zendesk/ruby-kafka/subscribers","subscription_url":"https://api.github.com/repos/zendesk/ruby-kafka/subscription","commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/ruby-kafka/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/ruby-kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/ruby-kafka/merges","archive_url":"https://api.github.com/repos/zendesk/ruby-kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/ruby-kafka/downloads","issues_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/ruby-kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/ruby-kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/ruby-kafka/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/ruby-kafka/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/ruby-kafka/deployments","created_at":"2016-01-18T13:24:55Z","updated_at":"2016-08-02T10:46:31Z","pushed_at":"2016-08-03T08:57:08Z","git_url":"git://github.com/zendesk/ruby-kafka.git","ssh_url":"git@github.com:zendesk/ruby-kafka.git","clone_url":"https://github.com/zendesk/ruby-kafka.git","svn_url":"https://github.com/zendesk/ruby-kafka","homepage":"http://www.rubydoc.info/gems/ruby-kafka","size":655,"stargazers_count":256,"watchers_count":256,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":20,"forks":29,"open_issues":20,"watchers":256,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"d9499b5f3b4080a872ea6eb7332c3a81297d4e0e","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":49878403,"name":"ruby-kafka","full_name":"zendesk/ruby-kafka","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/ruby-kafka","description":"A Ruby client library for Apache Kafka 0.9","fork":false,"url":"https://api.github.com/repos/zendesk/ruby-kafka","forks_url":"https://api.github.com/repos/zendesk/ruby-kafka/forks","keys_url":"https://api.github.com/repos/zendesk/ruby-kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/ruby-kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/ruby-kafka/teams","hooks_url":"https://api.github.com/repos/zendesk/ruby-kafka/hooks","issue_events_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/ruby-kafka/events","assignees_url":"https://api.github.com/repos/zendesk/ruby-kafka/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/ruby-kafka/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/ruby-kafka/tags","blobs_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/ruby-kafka/languages","stargazers_url":"https://api.github.com/repos/zendesk/ruby-kafka/stargazers","contributors_url":"https://api.github.com/repos/zendesk/ruby-kafka/contributors","subscribers_url":"https://api.github.com/repos/zendesk/ruby-kafka/subscribers","subscription_url":"https://api.github.com/repos/zendesk/ruby-kafka/subscription","commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/ruby-kafka/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/ruby-kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/ruby-kafka/merges","archive_url":"https://api.github.com/repos/zendesk/ruby-kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/ruby-kafka/downloads","issues_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/ruby-kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/ruby-kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/ruby-kafka/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/ruby-kafka/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/ruby-kafka/deployments","created_at":"2016-01-18T13:24:55Z","updated_at":"2016-08-02T10:46:31Z","pushed_at":"2016-08-03T08:57:08Z","git_url":"git://github.com/zendesk/ruby-kafka.git","ssh_url":"git@github.com:zendesk/ruby-kafka.git","clone_url":"https://github.com/zendesk/ruby-kafka.git","svn_url":"https://github.com/zendesk/ruby-kafka","homepage":"http://www.rubydoc.info/gems/ruby-kafka","size":655,"stargazers_count":256,"watchers_count":256,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":20,"forks":29,"open_issues":20,"watchers":256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/257"},"html":{"href":"https://github.com/zendesk/ruby-kafka/pull/257"},"issue":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/issues/257"},"comments":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/issues/257/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/257/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/257/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/a0b930054a9ec93021f11a7c814715a167a73de9"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":45,"deletions":15,"changed_files":2}}
{"actor":{"display_login":"dasch"}}