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

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

GitHub user tonysun83 opened a pull request:

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

    Return Error When Workers Crash

    Currently, when one worker survives in fabric_open_revs, we return that
    as the response. However, when all workers crash, we still return
    {ok, []}. This changes the response to an error.
    
    COUCHDB-3113

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

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

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

    https://github.com/apache/couchdb-fabric/pull/86.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 #86
    
----
commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51
Author: Tony Sun <[email protected]>
Date:   2017-01-25T21:47:00Z

    Return error when workers crash
    
    Currently, when one worker survives in fabric_open_revs, we return that
    as the response. However, when all workers crash, we still return
    {ok, []}. This changes the response to an error.
    
    COUCHDB-3113

----


> fabric:open_revs can return {ok, []}
> ------------------------------------
>
>                 Key: COUCHDB-3113
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3113
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: ILYA
>
> According to typespec fabric:open_revs should return
>  - {ok, #doc{}}  
>  - {{not_found,missing}, revision()} 
> However in the case when the coordinator receive rexi_EXIT from multiple 
> workers before the reply (for example when the worker crashes) the open_revs 
> reply becomes \{ok, []}.
> This is due to the fact that we dispatch rexi_DOWN and rexi_EXIT recursively 
> to handle_message(\{ok, Replies} [see 
> here|https://github.com/apache/couchdb-fabric/blob/master/src/fabric_doc_open_revs.erl#L73
>  clause]. Note that we set reply to be [] and worker to be nil. 



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

Reply via email to