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/01/21 23:57:40 UTC
couch commit: updated
refs/heads/2938-use-ddoc-cache-in-filtered-changes to 68f7bab
Repository: couchdb-couch
Updated Branches:
refs/heads/2938-use-ddoc-cache-in-filtered-changes [created] 68f7bab50
Use ddoc_cache and new fetch rpc format
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/68f7bab5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/68f7bab5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/68f7bab5
Branch: refs/heads/2938-use-ddoc-cache-in-filtered-changes
Commit: 68f7bab5028ce9abaf61a0386d2820609385ca4d
Parents: f33f9fa
Author: Russell Branca <ch...@apache.org>
Authored: Thu Jan 21 22:57:18 2016 +0000
Committer: Russell Branca <ch...@apache.org>
Committed: Thu Jan 21 22:57:18 2016 +0000
----------------------------------------------------------------------
src/couch_changes.erl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/68f7bab5/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index 7547aef..0d418e8 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -229,9 +229,12 @@ configure_filter(FilterName, Style, Req, Db) ->
FilterNameParts = string:tokens(FilterName, "/"),
case [?l2b(couch_httpd:unquote(Part)) || Part <- FilterNameParts] of
[DName, FName] ->
- {ok, DDoc} = open_ddoc(Db, <<"_design/", DName/binary>>),
+ DesignId = <<"_design/", DName/binary>>,
+ {ok, DDoc} = ddoc_cache:open_doc(fabric:dbname(Db), DesignId),
check_member_exists(DDoc, [<<"filters">>, FName]),
- {custom, Style, Req, DDoc, FName};
+ DIR = fabric_util:doc_id_and_rev(DDoc),
+ {fetch, Style, Req, DIR, FName};
+
[] ->
{default, Style};
_Else ->