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

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

GitHub user rnewson opened a pull request:

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

    Handle no_pass message when limit is 0

    A view query that uses both a filter and a limit value can appear to
    'hang' because the workers continue to run even after the number of
    requested items have been returned, as workers that find no more
    matches return 'no_pass' messages not 'change' messages, and thus the
    short-circuiting code is never activated.
    
    COUCHDB-3269

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

    $ git pull https://github.com/cloudant/couchdb-fabric 3269-filter-and-limit

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

    https://github.com/apache/couchdb-fabric/pull/82.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 #82
    
----
commit 58c810ede8e929c372ac575044311bf1bdb90d8a
Author: Robert Newson <[email protected]>
Date:   2017-01-09T12:30:02Z

    Handle no_pass message when limit is 0
    
    A view query that uses both a filter and a limit value can appear to
    'hang' because the workers continue to run even after the number of
    requested items have been returned, as workers that find no more
    matches return 'no_pass' messages not 'change' messages, and thus the
    short-circuiting code is never activated.
    
    COUCHDB-3269

----


> view response can 'hang' with filter and limit specified
> --------------------------------------------------------
>
>                 Key: COUCHDB-3269
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3269
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Robert Newson
>
> If you query a large view with both 'filter' and 'limit' specified, couchdb 
> will not promptly complete the view response after the requested number of 
> rows has been returned.
> This is because view completion happens on receipt of a 'change' or 
> 'completed' message from a worker. In the case of a filtered view request, 
> the worker might instead return a 'no_pass' message, indicating that no 
> documents passed the filter at a given sequence.
> Add a clause in fabric_view_changes to handle this special case and end the 
> view response promptly where possible.



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

Reply via email to