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 2014/08/28 14:12:04 UTC
[28/50] couch commit: updated refs/heads/master to 9d0ac7d
[WIP] Add an event for each updated design doc
This sends an event for each design doc so we can include the document
id.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/ee67f0e5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/ee67f0e5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/ee67f0e5
Branch: refs/heads/master
Commit: ee67f0e5f5a33798ad90728bf23d9e0c2d68cb74
Parents: 07731f3
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Aug 7 13:34:49 2014 -0500
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Aug 28 13:00:01 2014 +0100
----------------------------------------------------------------------
src/couch_db_updater.erl | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/ee67f0e5/src/couch_db_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_db_updater.erl b/src/couch_db_updater.erl
index 504c21e..2c1e808 100644
--- a/src/couch_db_updater.erl
+++ b/src/couch_db_updater.erl
@@ -289,6 +289,13 @@ handle_info({update_docs, Client, GroupedDocs, NonRepDocs, MergeConflicts,
[catch(ClientPid ! {done, self()}) || ClientPid <- Clients],
Db3 = case length(UpdatedDDocIds) > 0 of
true ->
+ % Ken and ddoc_cache are the only things that
+ % use the unspecified ddoc_updated message. We
+ % should update them to use the new message per
+ % ddoc.
+ lists:foreach(fun(DDocId) ->
+ couch_event:notify(Db2#db.name, {ddoc_updated, DDocId})
+ end, UpdatedDDocIds),
couch_event:notify(Db2#db.name, ddoc_updated),
ddoc_cache:evict(Db2#db.name, UpdatedDDocIds),
refresh_validate_doc_funs(Db2);