You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2016/02/10 23:31:57 UTC
[1/2] fabric commit: updated refs/heads/master to 0e5b33d
Repository: couchdb-fabric
Updated Branches:
refs/heads/master 31be53240 -> 0e5b33d25
Support fetch ddoc logic for filtered changes feeds
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/8bb97fcf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/8bb97fcf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/8bb97fcf
Branch: refs/heads/master
Commit: 8bb97fcf59d44374e4e0516a33293d22a9c2308c
Parents: 31be532
Author: Russell Branca <ch...@apache.org>
Authored: Thu Jan 21 22:55:13 2016 +0000
Committer: Russell Branca <ch...@apache.org>
Committed: Wed Feb 10 22:21:06 2016 +0000
----------------------------------------------------------------------
src/fabric_rpc.erl | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/8bb97fcf/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 2554f91..9b88c7f 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -47,7 +47,18 @@ changes(DbName, #changes_args{} = Args, StartSeq, DbOptions) ->
changes(DbName, [Args], StartSeq, DbOptions);
changes(DbName, Options, StartVector, DbOptions) ->
set_io_priority(DbName, DbOptions),
- #changes_args{dir=Dir} = Args = lists:keyfind(changes_args, 1, Options),
+ Args0 = lists:keyfind(changes_args, 1, Options),
+ #changes_args{dir=Dir, filter_fun=Filter} = Args0,
+ Args = case Filter of
+ {fetch, Style, Req, {DDocId, Rev}, FName} ->
+ {ok, DDoc} = ddoc_cache:open_doc(mem3:dbname(DbName), DDocId, Rev),
+ Args0#changes_args{
+ filter_fun={custom, Style, Req, DDoc, FName}
+ };
+ _ ->
+ Args0
+ end,
+
DbOpenOptions = Args#changes_args.db_open_options ++ DbOptions,
case get_or_create_db(DbName, DbOpenOptions) of
{ok, Db} ->
[2/2] fabric commit: updated refs/heads/master to 0e5b33d
Posted by ch...@apache.org.
Merge branch '2938-use-ddoc-cache-in-filtered-changes'
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/0e5b33d2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/0e5b33d2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/0e5b33d2
Branch: refs/heads/master
Commit: 0e5b33d259c08e4fb584ce767ec766bbe140e816
Parents: 31be532 8bb97fc
Author: Russell Branca <ch...@apache.org>
Authored: Wed Feb 10 22:31:07 2016 +0000
Committer: Russell Branca <ch...@apache.org>
Committed: Wed Feb 10 22:31:07 2016 +0000
----------------------------------------------------------------------
src/fabric_rpc.erl | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------