couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject [20/50] fabric commit: updated refs/heads/2971-count-distinct to 5d18415
Date Wed, 01 Mar 2017 16:38:18 GMT
Send a message when filtering a changes row

We managed to miss this change during the great merge as it was a
confusing mess in the cloudant/fabric repository. Its obvious in
hindsight once you see that we have a
`fabric_view_changes:handle_message/3` clause to handle the message.

COUCHDB-3178


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/6006bc6c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/6006bc6c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/6006bc6c

Branch: refs/heads/2971-count-distinct
Commit: 6006bc6c8e491456c186950cdc12257036142b16
Parents: ecdcc3d
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Tue Oct 4 15:12:38 2016 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Oct 4 15:15:06 2016 -0500

----------------------------------------------------------------------
 src/fabric_rpc.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/6006bc6c/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 2079ae8..afe7490 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -343,7 +343,7 @@ changes_enumerator(DocInfo, Acc) ->
     #doc_info{id=Id, high_seq=Seq, revs=[#rev_info{deleted=Del}|_]} = DocInfo,
     case [X || X <- couch_changes:filter(Db, DocInfo, Filter), X /= null] of
     [] ->
-        {ok, Acc#cacc{seq = Seq, pending = Pending-1}};
+        ChangesRow = {no_pass, Seq};
     Results ->
         Opts = if Conflicts -> [conflicts | DocOptions]; true -> DocOptions end,
         ChangesRow = {change, [
@@ -353,10 +353,10 @@ changes_enumerator(DocInfo, Acc) ->
             {changes, Results},
             {deleted, Del} |
             if IncludeDocs -> [doc_member(Db, DocInfo, Opts)]; true -> [] end
-        ]},
-        ok = rexi:stream2(ChangesRow),
-        {ok, Acc#cacc{seq = Seq, pending = Pending-1}}
-    end.
+        ]}
+    end,
+    ok = rexi:stream2(ChangesRow),
+    {ok, Acc#cacc{seq = Seq, pending = Pending-1}}.
 
 doc_member(Shard, DocInfo, Opts) ->
     case couch_db:open_doc(Shard, DocInfo, [deleted | Opts]) of


Mime
View raw message