couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] couch-mrview commit: updated refs/heads/master to def55ca
Date Wed, 12 Aug 2015 15:58:03 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master d72580062 -> def55ca6a


Add call to couch_index_plugin:index_update/4


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

Branch: refs/heads/master
Commit: 62473c324dcc9512e778a2e5c3df06dc0b51afa4
Parents: d725800
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Fri Jun 19 11:58:51 2015 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Wed Jul 29 13:29:51 2015 -0700

----------------------------------------------------------------------
 src/couch_mrview_updater.erl | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/62473c32/src/couch_mrview_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_updater.erl b/src/couch_mrview_updater.erl
index d0bd0f5..1346707 100644
--- a/src/couch_mrview_updater.erl
+++ b/src/couch_mrview_updater.erl
@@ -358,10 +358,12 @@ write_kvs(State, UpdateSeq, ViewKVs, DocIdKeys, Seqs, Log0) ->
         true ->
             {nil, nil}
         end,
-        View#mrview{btree=VBtree2,
+        View2 = View#mrview{btree=VBtree2,
                     seq_btree=SeqBtree3,
                     key_byseq_btree=KeyBySeqBtree3,
-                    update_seq=NewUpdateSeq}
+                    update_seq=NewUpdateSeq},
+        maybe_notify(State, View2, KVs, ToRem),
+        View2
     end,
 
     State#mrst{
@@ -467,3 +469,9 @@ update_task(NumChanges) ->
             (Changes2 * 100) div Total
     end,
     couch_task_status:update([{progress, Progress}, {changes_done, Changes2}]).
+
+
+maybe_notify(State, View, KVs, ToRem) ->
+    Updated = [Key || {{Key, _}, _} <- KVs],
+    Removed = [Key || {Key, _DocId} <- ToRem],
+    couch_index_plugin:index_update(State, View, Updated, Removed).


Mime
View raw message