You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/08/07 20:36:07 UTC
couch commit: updated refs/heads/windsor-merge to f5d8c8d
Repository: couchdb-couch
Updated Branches:
refs/heads/windsor-merge 2c36e1642 -> f5d8c8dbd
[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/f5d8c8db
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/f5d8c8db
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/f5d8c8db
Branch: refs/heads/windsor-merge
Commit: f5d8c8dbde776f9672cf2944e4364342bf342a92
Parents: 2c36e16
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Aug 7 13:34:49 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Thu Aug 7 13:35:52 2014 -0500
----------------------------------------------------------------------
src/couch_db_updater.erl | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/f5d8c8db/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);