[
https://issues.apache.org/jira/browse/COUCHDB-3337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093846#comment-16093846
]
ASF subversion and git services commented on COUCHDB-3337:
----------------------------------------------------------
Commit 825d0add611289eb624df5ef469a86c8ae3996b0 in couchdb's branch
refs/heads/jenkins-packages-2 from [~eiri]
[ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=825d0ad ]
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)