You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by bb...@apache.org on 2016/04/04 21:50:48 UTC

couch commit: updated refs/heads/master to c256ef5

Repository: couchdb-couch
Updated Branches:
  refs/heads/master fc9acc2f3 -> c256ef5d0


Add capability for compaction on local update

Prior to this commit, there was no functionality for a custom compactor
to know if the local database had been updated. This commit adds a
local_updated event, which will inform custom compactors when the local
tree has been updated.


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

Branch: refs/heads/master
Commit: c256ef5d098dce5b9624e117dab912205334c327
Parents: fc9acc2
Author: Benjamin Bastian <be...@gmail.com>
Authored: Tue Mar 29 20:06:41 2016 -0700
Committer: Benjamin Bastian <be...@gmail.com>
Committed: Mon Apr 4 10:53:49 2016 -0700

----------------------------------------------------------------------
 src/couch_db_updater.erl | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/c256ef5d/src/couch_db_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_db_updater.erl b/src/couch_db_updater.erl
index 2404984..813161a 100644
--- a/src/couch_db_updater.erl
+++ b/src/couch_db_updater.erl
@@ -294,6 +294,10 @@ handle_info({update_docs, Client, GroupedDocs, NonRepDocs, MergeConflicts,
             couch_event:notify(Db2#db.name, updated);
         true -> ok
         end,
+        if NonRepDocs2 /= [] ->
+            couch_event:notify(Db2#db.name, local_updated);
+        true -> ok
+        end,
         [catch(ClientPid ! {done, self()}) || ClientPid <- Clients],
         Db3 = case length(UpdatedDDocIds) > 0 of
             true ->