{"action":"created","issue":{"url":"https://api.github.com/repos/apache/couchdb-fabric/issues/35","labels_url":"https://api.github.com/repos/apache/couchdb-fabric/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/apache/couchdb-fabric/issues/35/comments","events_url":"https://api.github.com/repos/apache/couchdb-fabric/issues/35/events","html_url":"https://github.com/apache/couchdb-fabric/pull/35","id":113906889,"number":35,"title":"Fix function_clause when latest rev and the flag are explicitly provided","user":{"login":"kxepal","id":785983,"avatar_url":"https://avatars.githubusercontent.com/u/785983?v=3","gravatar_id":"","url":"https://api.github.com/users/kxepal","html_url":"https://github.com/kxepal","followers_url":"https://api.github.com/users/kxepal/followers","following_url":"https://api.github.com/users/kxepal/following{/other_user}","gists_url":"https://api.github.com/users/kxepal/gists{/gist_id}","starred_url":"https://api.github.com/users/kxepal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kxepal/subscriptions","organizations_url":"https://api.github.com/users/kxepal/orgs","repos_url":"https://api.github.com/users/kxepal/repos","events_url":"https://api.github.com/users/kxepal/events{/privacy}","received_events_url":"https://api.github.com/users/kxepal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-28T19:44:17Z","updated_at":"2015-10-29T20:46:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/couchdb-fabric/pulls/35","html_url":"https://github.com/apache/couchdb-fabric/pull/35","diff_url":"https://github.com/apache/couchdb-fabric/pull/35.diff","patch_url":"https://github.com/apache/couchdb-fabric/pull/35.patch"},"body":"Current implementation assumes that amount of received responses will\r\nmatch amount of specified revisions for open_revs query parameter.\r\nHowever, for case when open_revs contains old and leaf revisions with\r\namong with latest=true query parameter that's not true: RawReplies will\r\nonly contain the latest revision, while old ones will not be included.\r\nThis makes All and RawReplies lists mismatch by the length making\r\nzipwith/3 crash with the function_clause error.\r\n\r\nThe fix respects both optimistic and pessimistic cases: when all is fine\r\nwe use zipwith/3 as we did before, but otherwise we're trying to group\r\nthem only by leaf revisions that document have and which are defined in\r\nrequest parameter.\r\n\r\nCOUCHDB-2863"},"comment":{"url":"https://api.github.com/repos/apache/couchdb-fabric/issues/comments/152315860","html_url":"https://github.com/apache/couchdb-fabric/pull/35#issuecomment-152315860","issue_url":"https://api.github.com/repos/apache/couchdb-fabric/issues/35","id":152315860,"user":{"login":"kxepal","id":785983,"avatar_url":"https://avatars.githubusercontent.com/u/785983?v=3","gravatar_id":"","url":"https://api.github.com/users/kxepal","html_url":"https://github.com/kxepal","followers_url":"https://api.github.com/users/kxepal/followers","following_url":"https://api.github.com/users/kxepal/following{/other_user}","gists_url":"https://api.github.com/users/kxepal/gists{/gist_id}","starred_url":"https://api.github.com/users/kxepal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kxepal/subscriptions","organizations_url":"https://api.github.com/users/kxepal/orgs","repos_url":"https://api.github.com/users/kxepal/repos","events_url":"https://api.github.com/users/kxepal/events{/privacy}","received_events_url":"https://api.github.com/users/kxepal/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T20:46:07Z","updated_at":"2015-10-29T20:46:07Z","body":"Ok, I'll try to play with your gist then and handle other problems you mention. However, bug in key_tree I'll skip since I'm not yet ready to go there.\r\n\r\nWill ping you later, thanks!"}}