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 2014/08/01 11:04:58 UTC

[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 <ch...@gmail.com>
Authored: Wed Apr 30 14:28:36 2014 -0700
Committer: Robert Newson <rn...@apache.org>
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) ->
-    <<DbName/binary, "/_security">>.
+    Suffix = list_to_binary(mem3:shard_suffix(DbName)),
+    <<DbName/binary, Suffix/binary, "/_security">>.
 
 
 get_security(DbName) ->