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/07/18 02:24:00 UTC

[jira] [Commented] (COUCHDB-3337) End-point _local_docs doesn't conform to query params of _all_docs

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

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

Commit 860f23cb57e0af84b668609676ba93c5edb769d5 in couchdb's branch refs/heads/master from [~eiri]
[ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=860f23c ]

Fix _local_docs end-point

This is a second attempt to fix _local_docs end-point. The previous one didn't
work on big enough btree_local, because local btree doesn't have reduction fun,
so reuse of couch_db_updater:btree_by_id_reduce/2 was crashing on a bad match
as soon as btree_local was getting kp_node. Also using full fold to calculate
total_rows value turned out to be resource expensive when a database have
significant number of local documents.

This fix avoids calculating of total_rows and offset instead always setting
them to null and also setting to null update_seq when requested, since it
doesn't have meaning in context of local documents.

A fabric module fabric_view_all_docs.erl was copied and modified as
fabric_view_local_docs.erl, because re-using it for processing of both types of
the documents was getting rather convoluted.

Jira: COUCHDB-3337


> End-point _local_docs doesn't conform to query params of _all_docs
> ------------------------------------------------------------------
>
>                 Key: COUCHDB-3337
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3337
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Eric Avdey
>            Assignee: Eric Avdey
>
> There are following issues with {{/db/_local_doc end-point}}
> # It ignores include_docs parameter
> # It reports incorrect total_rows value, returning total rows of non-local docs instead
> # It crashes with {{badrecord}} {{full_doc_info}} when query trying to skip records



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)