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

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

GitHub user tonysun83 opened a pull request:

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

    Add Else Clause For Embed Doc

    When open_doc or open_revs return an error, we set the doc value
    to be an error message. This way we account for errors rather than
    transform_row throwing a function_clause.
    
    This PR will not be merged until 
https://github.com/apache/couchdb-fabric/pull/86 is merged.
    Another PR for chttpd will contain end-to-end tests that will cover the 
testing for this PR.
    
    COUCHDB-3109

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

    $ git pull https://github.com/cloudant/couchdb-fabric 68661-embed-doc-error

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

    https://github.com/apache/couchdb-fabric/pull/87.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 #87
    
----
commit 3a8c71485893706e539ba51891a7785ffa0a82e7
Author: Tony Sun <[email protected]>
Date:   2017-02-01T04:47:13Z

    Add Else Clause For Embed Doc
    
    When open_doc or open_revs return an error, we set the doc value
    to be an error message. This way we account for errors rather than
    transform_row throwing a function_clause.
    
    COUCHDB-3109

----


> 500 when include_docs=true for linked documents
> -----------------------------------------------
>
>                 Key: COUCHDB-3109
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3109
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: ILYA
>
> The problem happen when following conditions are satisfied:
> - user uses [linked 
> documents|http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views#Linked_documents]
>  feature i.e. view emits {_id: "other_doc_id"}
> - query has include_docs=true
> - one of the shards returns any error or times out
> In this case we would have case_clause error either
> - in [case 
> fabric:open_doc|https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view.erl#L171]
> - in [case 
> fabric:open_revs|https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view.erl#L179]
> This case_clause error propagates to 
> [transform_row|https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view.erl#L132]
>  and fails there since transform_row doesn't have a clause to handle errors.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to