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 2013/06/29 17:17:57 UTC

[16/50] [abbrv] git commit: updated refs/heads/1843-feature-bigcouch to cba2e81

Notify the ddoc cache when design docs change


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

Branch: refs/heads/1843-feature-bigcouch
Commit: df41b31ac7a703e3408672975f746ae5e62697de
Parents: c92694a
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Jan 23 15:16:29 2013 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:52 2013 -0500

----------------------------------------------------------------------
 src/couch/src/couch_db_updater.erl | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/df41b31a/src/couch/src/couch_db_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch/src/couch_db_updater.erl b/src/couch/src/couch_db_updater.erl
index 1be3e3a..e1dc7c3 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -732,11 +732,12 @@ update_docs_int(Db, DocsList, NonRepDocs, MergeConflicts, FullCommit) ->
 
     % Check if we just updated any design documents, and update the validation
     % funs if we did.
-    Db4 = case UpdatedDDocIds of
-    [] ->
-        Db3;
-    _ ->
-        refresh_validate_doc_funs(Db3)
+    Db4 = case length(UpdatedDDocIds) > 0 of
+        true ->
+            ddoc_cache:evict(Db3#db.name, UpdatedDDocIds),
+            refresh_validate_doc_funs(Db3);
+        false ->
+            Db3
     end,
 
     {ok, commit_data(Db4, not FullCommit), UpdatedDDocIds}.