[ 
https://issues.apache.org/jira/browse/COUCHDB-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15252686#comment-15252686
 ] 

ASF GitHub Bot commented on COUCHDB-2863:
-----------------------------------------

GitHub user davisp opened a pull request:

    https://github.com/apache/couchdb-fabric/pull/47

    Fix fabric_doc_open_revs

    When a user specified multiple revisions on a single branch to
    fabric_doc_open_revs it would throw a function clause exception in
    lists:zipwith/3. This was due to a bad assumption that there would only
    ever be exactly one revision for every input revision.
    
    Due to the possibility of having zero or more revisions for a given
    revision when using latest=true this code had to be changed fairly
    significantly.
    
    COUCHDB-2863

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-fabric 
2863-fix-fabric-doc-open-revs

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fabric/pull/47.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #47
    
----
commit a1b252e6c40e746ae52d72b371c51f53228c7c52
Author: Paul J. Davis <[email protected]>
Date:   2016-04-21T20:42:27Z

    Fix fabric_doc_open_revs
    
    When a user specified multiple revisions on a single branch to
    fabric_doc_open_revs it would throw a function clause exception in
    lists:zipwith/3. This was due to a bad assumption that there would only
    ever be exactly one revision for every input revision.
    
    Due to the possibility of having zero or more revisions for a given
    revision when using latest=true this code had to be changed fairly
    significantly.
    
    COUCHDB-2863

----


> function_clause on requesting multiple open_revs with lastest=true
> ------------------------------------------------------------------
>
>                 Key: COUCHDB-2863
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2863
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Alexander Shorin
>            Assignee: Alexander Shorin
>            Priority: Blocker
>              Labels: has-pr
>
> During work on the COUCHDB-2857 found another issue for us:
> {code}
> $ echo '{}' | http put http://localhost:15984/db/doc
> {
>     "id": "doc",
>     "ok": true,
>     "rev": "1-967a00dff5e02add41819138abb3284d"
> }
> $ echo '{"_rev": "1-967a00dff5e02add41819138abb3284d"}' | http put 
> http://localhost:15984/db/doc
> {
>     "id": "doc",
>     "ok": true,
>     "rev": "2-7051cbe5c8faecd085a3fa619e6e6337"
> }
> $ http 
> 'http://localhost:15984/db/doc?open_revs=["1-967a00dff5e02add41819138abb3284d";,
>  "2-7051cbe5c8faecd085a3fa619e6e6337"]&latest=true'
> {"error":"unknown_error","reason":"function_clause","ref":162084788}
> $ cat dev/logs/node1.log
> 2015-10-28 02:38:26.707 [error] [email protected] <0.1222.0> req_err(162084788) 
> unknown_error : function_clause
>     [<<"lists:zipwith/3 L450">>,<<"lists:zipwith/3 
> L450">>,<<"fabric_doc_open_revs:handle_message/3 
> L104">>,<<"rexi_utils:process_mailbox/6 L55">>,<<"rexi_utils:recv/6 
> L49">>,<<"fabric_doc_open_revs:go/4 L47">>,<<"chttpd_db:db_doc_req/3 
> L660">>,<<"chttpd:handle_request_int/1 L238">>]
> 2015-10-28 02:38:26.707 [error] [email protected] <0.1222.0> httpd 500 error 
> response:
>  {"error":"unknown_error","reason":"function_clause","ref":162084788}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to