couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [2/3] couch commit: updated refs/heads/master to 5a009b1
Date Wed, 06 Jul 2016 14:26:27 GMT
Add fast_view filter to changes clustered access

A changes feed can be filtered using view's btree
instead of a database btree, a feature known as fast_view.
This feature not implemented on a clustered interface,
however view filter automatically marked as fast_view
when ddoc has option seq_indexed enabled, which leads to
a crash of filtered replication.

This change allows fast_view filter to be processed
as a regular view filter when used on a clustered
interface.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/31ab718f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/31ab718f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/31ab718f

Branch: refs/heads/master
Commit: 31ab718f9273f3b735af5e8ed0d3e2e819111c0e
Parents: 884d547
Author: Eric Avdey <eiri@eiri.ca>
Authored: Fri Jun 24 13:32:37 2016 -0300
Committer: Eric Avdey <eiri@eiri.ca>
Committed: Fri Jun 24 14:10:21 2016 -0300

----------------------------------------------------------------------
 src/couch_changes.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/31ab718f/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index beac089..b37aabf 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -281,7 +281,8 @@ filter(_Db, DocInfo, {design_docs, Style}) ->
         _ ->
             []
     end;
-filter(Db, DocInfo, {view, Style, DDoc, VName}) ->
+filter(Db, DocInfo, {FilterType, Style, DDoc, VName})
+        when FilterType == view; FilterType == fast_view ->
     Docs = open_revs(Db, DocInfo, Style),
     {ok, Passes} = couch_query_servers:filter_view(DDoc, VName, Docs),
     filter_revs(Passes, Docs);


Mime
View raw message