You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/08/12 17:58:03 UTC

[1/2] couch-mrview commit: updated refs/heads/master to def55ca

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 <ii...@ca.ibm.com>
Authored: Fri Jun 19 11:58:51 2015 -0700
Committer: ILYA Khlopotov <ii...@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).


[2/2] couch-mrview commit: updated refs/heads/master to def55ca

Posted by rn...@apache.org.
Use closure funs to specify transformer functions


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/def55ca6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/def55ca6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/def55ca6

Branch: refs/heads/master
Commit: def55ca6a731387fb25a3e5fb524dc0bf56ff040
Parents: 62473c3
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed Aug 5 15:39:42 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed Aug 5 15:39:42 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/def55ca6/src/couch_mrview_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_updater.erl b/src/couch_mrview_updater.erl
index 1346707..0745c2a 100644
--- a/src/couch_mrview_updater.erl
+++ b/src/couch_mrview_updater.erl
@@ -472,6 +472,10 @@ update_task(NumChanges) ->
 
 
 maybe_notify(State, View, KVs, ToRem) ->
-    Updated = [Key || {{Key, _}, _} <- KVs],
-    Removed = [Key || {Key, _DocId} <- ToRem],
+    Updated = fun() ->
+        [Key || {{Key, _}, _} <- KVs]
+    end,
+    Removed = fun() ->
+        [Key || {Key, _DocId} <- ToRem]
+    end,
     couch_index_plugin:index_update(State, View, Updated, Removed).