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 DA35E1122A for ; Fri, 1 Aug 2014 09:04:54 +0000 (UTC) Received: (qmail 80084 invoked by uid 500); 1 Aug 2014 09:04:54 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 79906 invoked by uid 500); 1 Aug 2014 09:04:54 -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 79659 invoked by uid 99); 1 Aug 2014 09:04:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 09:04:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 442829BC98A; Fri, 1 Aug 2014 09:04:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org Date: Fri, 01 Aug 2014 09:04:58 -0000 Message-Id: In-Reply-To: <674f5cb12c0f4a2da0b05d25c0e2f1b5@git.apache.org> References: <674f5cb12c0f4a2da0b05d25c0e2f1b5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [5/9] git commit: Use shard suffix in the security metadata id Use shard suffix in the security metadata id The primary purpose here is to be able to distinguish between different version of the same database name. We shouldn't have security properties be inherited when a database is recreated. Adding the suffix to the metadata id allows us to make this distinction, but it also allows us to lazily deal with clearing out security docs for old deleted database. Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/02a5c7ce Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/02a5c7ce Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/02a5c7ce Branch: refs/heads/windsor-merge Commit: 02a5c7ceae7da2e4f6bfb22e781f59c1d4e921bc Parents: c1bb498 Author: Russell Branca Authored: Wed Apr 30 14:28:36 2014 -0700 Committer: Robert Newson Committed: Wed Jul 30 18:16:34 2014 +0100 ---------------------------------------------------------------------- src/cassim_security.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/02a5c7ce/src/cassim_security.erl ---------------------------------------------------------------------- diff --git a/src/cassim_security.erl b/src/cassim_security.erl index 52fa56a..6cf4c68 100644 --- a/src/cassim_security.erl +++ b/src/cassim_security.erl @@ -41,7 +41,8 @@ security_meta_id(DbName) -> - <>. + Suffix = list_to_binary(mem3:shard_suffix(DbName)), + <>. get_security(DbName) ->