couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [15/50] couch commit: updated refs/heads/import to 09c6556
Date Mon, 10 Feb 2014 20:22:37 GMT
Notify the ddoc cache when design docs change


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

Branch: refs/heads/import
Commit: 207708a09adf9162f2fe133a1662a3b90b222df7
Parents: 651e26f
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Wed Jan 23 15:16:29 2013 -0600
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Feb 4 17:03:24 2014 -0600

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/207708a0/src/couch_db_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_db_updater.erl b/src/couch_db_updater.erl
index 1be3e3a..e1dc7c3 100644
--- a/src/couch_db_updater.erl
+++ b/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}.


Mime
View raw message