You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/04/04 21:19:41 UTC

[jira] [Commented] (COUCHDB-3113) fabric:open_revs can return {ok, []}

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

ASF subversion and git services commented on COUCHDB-3113:
----------------------------------------------------------

Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/COUCHDB-3288-remove-public-db-record from [~tonysun83]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ]

Use RealReplyCount to distinguish worker replies and invalid docs

We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value
when the document does not exist and open_revs=all. This leads to an
incorrect all_workers_died error. We use ReplyCount and RealReplyCount
to distinguish between when no workers were actually used in a reply
versus when the document does not exist

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.15#6346)