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 2016/06/02 17:15:59 UTC

[jira] [Commented] (COUCHDB-3026) fabric:open_revs doesn't filter out not_found replies anymore

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

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

Commit 4dd11bd2ac12eaa899a65baf925568a3c2b866a3 in couchdb-fabric's branch refs/heads/master from [~iilyak]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=4dd11bd ]

Filter out not_found replies when #doc{} is found

There are places in the codebase which assume that the return from
open_revs is always a list with one element in it. Fix the regression
introduced in 9a1d0c5 by filtering out not_found replies when any of the
returns contains #doc{}.

COUCHDB-3026


> fabric:open_revs doesn't filter out not_found replies anymore
> -------------------------------------------------------------
>
>                 Key: COUCHDB-3026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3026
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: ILYA
>
> Previously we filtered out `{{not_found,missing}, …}` replies in this line.
> We don’t filter them out anymore. Therefore `fabric:open_revs` returns more than one reply. In some places we assume that the return from open_revs is always a list with one element in it. As a result we get a badmatch there.
> Here is the list of places where we assume single reply:
> - https://github.com/apache/couchdb-chttpd/blob/master/src/chttpd_db.erl#L699
> - https://github.com/apache/couchdb-chttpd/blob/master/src/chttpd_db.erl#L1040:L1044
> - https://github.com/apache/couchdb-chttpd/blob/master/src/chttpd_db.erl#L1209:L1210
> - https://github.com/apache/couchdb-ddoc-cache/blob/master/src/ddoc_cache_opener.erl#L123
> - https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view.erl#L180:L183
> All above places are broken if we don't filter not_found.



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