From c256ef5d098dce5b9624e117dab912205334c327 Mon Sep 17 00:00:00 2001 From: Benjamin Bastian Date: Tue, 29 Mar 2016 20:06:41 -0700 Subject: [PATCH] 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. --- src/couch_db_updater.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/couch_db_updater.erl b/src/couch_db_updater.erl index 24049841..813161ab 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 ->