couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [28/50] couch commit: updated refs/heads/master to 9d0ac7d
Date Thu, 28 Aug 2014 12:12:04 GMT
[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 <paul.joseph.davis@gmail.com>
Authored: Thu Aug 7 13:34:49 2014 -0500
Committer: Robert Newson <rnewson@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);


Mime
View raw message