{"action":"closed","number":1959,"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/1959","id":50464983,"html_url":"https://github.com/druid-io/druid/pull/1959","diff_url":"https://github.com/druid-io/druid/pull/1959.diff","patch_url":"https://github.com/druid-io/druid/pull/1959.patch","issue_url":"https://api.github.com/repos/druid-io/druid/issues/1959","number":1959,"state":"closed","locked":false,"title":"Fix IncrementalIndexAdapter getRows() Iterable","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars.githubusercontent.com/u/8729063?v=3","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"body":"The existing Iterable returned by IncrementalIndexAdapter.getRows() does not work correctly if it is walked more than once.\r\n\r\nThe \"count\" integer inside the transformation function never gets reset, so after iterating through the getRows() iterable once, the Rowboats that are returned have invalid rowNums.\r\n\r\nThe patch changes the behavior of getRows() so that a new Iterator is created each time iterator() is called on the returned Iterable; the transform function and its count variable are no longer shared across iterator() calls.\r\n\r\n=============\r\n\r\nThis came up as I was stepping through testPersistMerge() from IndexMergerTest in a debugger, and makeIndexFiles from IndexMerger. \r\n\r\nWhen IndexMerger is merging rows:\r\nIterable<Rowboat> theRows = rowMergerFn.apply(boats);\r\n\r\nI looked at the Iterable<Rowboat> objects within \"boats\" in the debugger; by doing so, the debugger walked through these Iterables, and I saw some BufferOverflow exceptions, because of the rowNum issue mentioned above.\r\n\r\n","created_at":"2015-11-12T02:33:15Z","updated_at":"2015-11-12T22:38:33Z","closed_at":"2015-11-12T22:38:33Z","merged_at":"2015-11-12T22:38:33Z","merge_commit_sha":"cafd135d1998422d20a69a39f2330f4088a16a9e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/druid-io/druid/pulls/1959/commits","review_comments_url":"https://api.github.com/repos/druid-io/druid/pulls/1959/comments","review_comment_url":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/1959/comments","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/cdceaf2d269db79e8eb6c68702cb507a7807721a","head":{"label":"jon-wei:indexadapter_getrows","ref":"indexadapter_getrows","sha":"cdceaf2d269db79e8eb6c68702cb507a7807721a","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars.githubusercontent.com/u/8729063?v=3","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"repo":{"id":41450391,"name":"druid","full_name":"jon-wei/druid","owner":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars.githubusercontent.com/u/8729063?v=3","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jon-wei/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":true,"url":"https://api.github.com/repos/jon-wei/druid","forks_url":"https://api.github.com/repos/jon-wei/druid/forks","keys_url":"https://api.github.com/repos/jon-wei/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jon-wei/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jon-wei/druid/teams","hooks_url":"https://api.github.com/repos/jon-wei/druid/hooks","issue_events_url":"https://api.github.com/repos/jon-wei/druid/issues/events{/number}","events_url":"https://api.github.com/repos/jon-wei/druid/events","assignees_url":"https://api.github.com/repos/jon-wei/druid/assignees{/user}","branches_url":"https://api.github.com/repos/jon-wei/druid/branches{/branch}","tags_url":"https://api.github.com/repos/jon-wei/druid/tags","blobs_url":"https://api.github.com/repos/jon-wei/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jon-wei/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jon-wei/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/jon-wei/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jon-wei/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/jon-wei/druid/languages","stargazers_url":"https://api.github.com/repos/jon-wei/druid/stargazers","contributors_url":"https://api.github.com/repos/jon-wei/druid/contributors","subscribers_url":"https://api.github.com/repos/jon-wei/druid/subscribers","subscription_url":"https://api.github.com/repos/jon-wei/druid/subscription","commits_url":"https://api.github.com/repos/jon-wei/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/jon-wei/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/jon-wei/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/jon-wei/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/jon-wei/druid/contents/{+path}","compare_url":"https://api.github.com/repos/jon-wei/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jon-wei/druid/merges","archive_url":"https://api.github.com/repos/jon-wei/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jon-wei/druid/downloads","issues_url":"https://api.github.com/repos/jon-wei/druid/issues{/number}","pulls_url":"https://api.github.com/repos/jon-wei/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/jon-wei/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/jon-wei/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jon-wei/druid/labels{/name}","releases_url":"https://api.github.com/repos/jon-wei/druid/releases{/id}","created_at":"2015-08-26T21:18:05Z","updated_at":"2015-08-26T21:18:11Z","pushed_at":"2015-11-12T21:11:21Z","git_url":"git://github.com/jon-wei/druid.git","ssh_url":"git@github.com:jon-wei/druid.git","clone_url":"https://github.com/jon-wei/druid.git","svn_url":"https://github.com/jon-wei/druid","homepage":"http://druid.io","size":98911,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"druid-io:master","ref":"master","sha":"ef74cd394cf5cc585b8a1d2a5046b90afa9699ff","user":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"repo":{"id":6358188,"name":"druid","full_name":"druid-io/druid","owner":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/druid-io/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":false,"url":"https://api.github.com/repos/druid-io/druid","forks_url":"https://api.github.com/repos/druid-io/druid/forks","keys_url":"https://api.github.com/repos/druid-io/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/druid-io/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/druid-io/druid/teams","hooks_url":"https://api.github.com/repos/druid-io/druid/hooks","issue_events_url":"https://api.github.com/repos/druid-io/druid/issues/events{/number}","events_url":"https://api.github.com/repos/druid-io/druid/events","assignees_url":"https://api.github.com/repos/druid-io/druid/assignees{/user}","branches_url":"https://api.github.com/repos/druid-io/druid/branches{/branch}","tags_url":"https://api.github.com/repos/druid-io/druid/tags","blobs_url":"https://api.github.com/repos/druid-io/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/druid-io/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/druid-io/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/druid-io/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/druid-io/druid/languages","stargazers_url":"https://api.github.com/repos/druid-io/druid/stargazers","contributors_url":"https://api.github.com/repos/druid-io/druid/contributors","subscribers_url":"https://api.github.com/repos/druid-io/druid/subscribers","subscription_url":"https://api.github.com/repos/druid-io/druid/subscription","commits_url":"https://api.github.com/repos/druid-io/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/druid-io/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/druid-io/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/druid-io/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/druid-io/druid/contents/{+path}","compare_url":"https://api.github.com/repos/druid-io/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/druid-io/druid/merges","archive_url":"https://api.github.com/repos/druid-io/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/druid-io/druid/downloads","issues_url":"https://api.github.com/repos/druid-io/druid/issues{/number}","pulls_url":"https://api.github.com/repos/druid-io/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/druid-io/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/druid-io/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/druid-io/druid/labels{/name}","releases_url":"https://api.github.com/repos/druid-io/druid/releases{/id}","created_at":"2012-10-23T19:08:07Z","updated_at":"2015-11-12T17:08:11Z","pushed_at":"2015-11-12T22:38:33Z","git_url":"git://github.com/druid-io/druid.git","ssh_url":"git@github.com:druid-io/druid.git","clone_url":"https://github.com/druid-io/druid.git","svn_url":"https://github.com/druid-io/druid","homepage":"http://druid.io","size":184200,"stargazers_count":2157,"watchers_count":2157,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":492,"mirror_url":null,"open_issues_count":221,"forks":492,"open_issues":221,"watchers":2157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/1959"},"html":{"href":"https://github.com/druid-io/druid/pull/1959"},"issue":{"href":"https://api.github.com/repos/druid-io/druid/issues/1959"},"comments":{"href":"https://api.github.com/repos/druid-io/druid/issues/1959/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/druid/pulls/1959/comments"},"review_comment":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/druid-io/druid/pulls/1959/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/druid/statuses/cdceaf2d269db79e8eb6c68702cb507a7807721a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"xvrl","id":815147,"avatar_url":"https://avatars.githubusercontent.com/u/815147?v=3","gravatar_id":"","url":"https://api.github.com/users/xvrl","html_url":"https://github.com/xvrl","followers_url":"https://api.github.com/users/xvrl/followers","following_url":"https://api.github.com/users/xvrl/following{/other_user}","gists_url":"https://api.github.com/users/xvrl/gists{/gist_id}","starred_url":"https://api.github.com/users/xvrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xvrl/subscriptions","organizations_url":"https://api.github.com/users/xvrl/orgs","repos_url":"https://api.github.com/users/xvrl/repos","events_url":"https://api.github.com/users/xvrl/events{/privacy}","received_events_url":"https://api.github.com/users/xvrl/received_events","type":"User","site_admin":false},"comments":5,"review_comments":1,"commits":1,"additions":90,"deletions":26,"changed_files":2}}