You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2017/01/03 13:23:56 UTC
[1/2] fabric commit: updated refs/heads/master to eb69784
Repository: couchdb-fabric
Updated Branches:
refs/heads/master 205064aa5 -> eb6978438
Include conflicts parameter in doc_options
When a keys array is passed to _all_docs, fabric translates this
to individual open_doc calls. The conflicts=true query parameter is
specified as a view-level option and is not, by default, parsed as
an option that should be passed to open_doc.
As a workaround, explicitly copy the view-level conflict parameter into
the document options before open_doc is called.
An alternative approach would be to address this when the query
parameters are parsed, setting conflicts=true in both #mrargs and
detail of fabric, I elected to make the change here instead.
Fixes #COUCHDB-3264
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/8dcc3fb1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/8dcc3fb1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/8dcc3fb1
Branch: refs/heads/master
Commit: 8dcc3fb175807ac18a3d7c1fc95364910ee8969e
Parents: 863b8d9
Author: Will Holley <wi...@gmail.com>
Authored: Tue Jan 3 09:54:30 2017 +0000
Committer: Will Holley <wi...@gmail.com>
Committed: Tue Jan 3 10:37:15 2017 +0000
----------------------------------------------------------------------
src/fabric_view_all_docs.erl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/8dcc3fb1/src/fabric_view_all_docs.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_all_docs.erl b/src/fabric_view_all_docs.erl
index 90ff128..2ba6f0d 100644
--- a/src/fabric_view_all_docs.erl
+++ b/src/fabric_view_all_docs.erl
@@ -54,14 +54,19 @@ go(DbName, Options, QueryArgs, Callback, Acc0) ->
#mrargs{
direction = Dir,
include_docs = IncludeDocs,
- doc_options = Doc_Options,
+ doc_options = DocOptions0,
limit = Limit,
+ conflicts = Conflicts,
skip = Skip,
keys = Keys0
} = QueryArgs,
{_, Ref0} = spawn_monitor(fun() -> exit(fabric:get_doc_count(DbName)) end),
+ DocOptions1 = case Conflicts of
+ true -> [conflicts|DocOptions0];
+ _ -> DocOptions0
+ end,
SpawnFun = fun(Key) ->
- spawn_monitor(?MODULE, open_doc, [DbName, Options ++ Doc_Options, Key, IncludeDocs])
+ spawn_monitor(?MODULE, open_doc, [DbName, Options ++ DocOptions1, Key, IncludeDocs])
end,
MaxJobs = all_docs_concurrency(),
Keys1 = case Dir of
[2/2] fabric commit: updated refs/heads/master to eb69784
Posted by rn...@apache.org.
Merge remote-tracking branch 'willholley/3264-alldocs-keys-conflicts'
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/eb697843
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/eb697843
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/eb697843
Branch: refs/heads/master
Commit: eb697843865c39cec5d7831d9a0f02edf90d06ba
Parents: 205064a 8dcc3fb
Author: Robert Newson <rn...@apache.org>
Authored: Tue Jan 3 13:22:41 2017 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jan 3 13:22:41 2017 +0000
----------------------------------------------------------------------
src/fabric_view_all_docs.erl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------