Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2904D106C2 for ; Tue, 4 Feb 2014 23:08:10 +0000 (UTC) Received: (qmail 64804 invoked by uid 500); 4 Feb 2014 23:07:04 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 63865 invoked by uid 500); 4 Feb 2014 23:06:33 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 63096 invoked by uid 99); 4 Feb 2014 23:06:16 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 23:06:16 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 511C2824EF3; Tue, 4 Feb 2014 23:06:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davisp@apache.org To: commits@couchdb.apache.org Date: Tue, 04 Feb 2014 23:06:43 -0000 Message-Id: <2ea5cc3613934f1691545546ee219e69@git.apache.org> In-Reply-To: <1094a8bf4296470e9b76821c8c074ad1@git.apache.org> References: <1094a8bf4296470e9b76821c8c074ad1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [30/50] couch commit: updated refs/heads/import to c3116d7 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 Authored: Wed Jan 23 15:16:29 2013 -0600 Committer: Paul J. Davis 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}.