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

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

GitHub user willholley opened a pull request:

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

    Handle empty list of id/revs in fabric:get_missing_revs

    fabric_doc_missing_revs:go doesn't handle the case when AllIdsRevs is an 
empty list (resulting in a timeout). Given this will always result
    in an empty response, handle this explicitly and avoid the delegation / 
aggregation from shards.
    
    An alternative solution would be to fix fabric_doc_missing_revs:go to 
prevent the time out rather than returning immediately. Comments on that 
approach vs the proposed solution and guidance around where to add appropriate 
tests for the original problem (POST to /_revs_diff with no revisions times out 
in clustered CouchDB 2.0) would be much appreciated.
    
    COUCHDB-2531

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

    $ git pull https://github.com/willholley/couchdb-fabric 
2531-handle-empty-idrevs-get-missing-revs

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

    https://github.com/apache/couchdb-fabric/pull/10.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 #10
    
----
commit 2f0798b3f0c16f2010a09bf15dc0d4ac60bd7f6e
Author: Will Holley <willhol...@gmail.com>
Date:   2015-01-30T21:56:16Z

    Handle empty list of id/revs in fabric:get_missing_revs
    
    fabric_doc_missing_revs:go doesn't handle the case when AllIdsRevs is
    an empty list (resulting in a timeout). Given this will always result
    in an empty response, handle this explicitly and avoid the delegation /
    aggregation from shards.
    
    COUCHDB-2531

----


> CouchDB 2.0: POST to /_revs_diff with no revisions times out
> ------------------------------------------------------------
>
>                 Key: COUCHDB-2531
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2531
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>            Reporter: Will Holley
>
> In CouchDB 1.6, posting an empty object to the _revs_diff endpoint returns an 
> empty object:
> {code}
> $ curl http://127.0.0.1:5984/revsdifftest -XPUT                               
>                                                                           
> {"ok":true}
> $ curl http://127.0.0.1:5984/revsdifftest/_revs_diff -XPOST 
> -H"Content-Type:application/json" -d"{}"
> {}
> {code}
> In CouchDB 2.0, the same request results in a timeout:
> {code}
> $ curl http://127.0.0.1:15984/revsdifftest -XPUT                              
>                                                                            
> {"ok":true}
> $ curl http://127.0.0.1:15984/revsdifftest/_revs_diff -XPOST 
> -H"Content-Type:application/json" -d"{}"
> {"error":"badmatch","reason":"{error,timeout}","ref":1478668763}
> {code}
> This currently breaks the PouchDB test suite when running against CouchDB 
> master.



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

Reply via email to