couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [19/50] couch commit: updated refs/heads/2080-port-cors-to-chttpd to 529339b
Date Tue, 02 Jun 2015 19:35:50 GMT
Add underscore prefix for dbs, nodes and cassim database names

That's how we name system databases and there should be no exceptions.

COUCHDB-2619


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

Branch: refs/heads/2080-port-cors-to-chttpd
Commit: bd680685d6c9493329e4ff7f4cbb71070f095d6d
Parents: 635ecae
Author: Alexander Shorin <kxepal@apache.org>
Authored: Wed Feb 25 21:48:41 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Wed Feb 25 21:52:09 2015 +0300

----------------------------------------------------------------------
 src/couch_server.erl | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/bd680685/src/couch_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_server.erl b/src/couch_server.erl
index 5350e0f..12bb5c1 100644
--- a/src/couch_server.erl
+++ b/src/couch_server.erl
@@ -119,8 +119,8 @@ delete(DbName, Options) ->
 maybe_add_sys_db_callbacks(DbName, Options) when is_binary(DbName) ->
     maybe_add_sys_db_callbacks(?b2l(DbName), Options);
 maybe_add_sys_db_callbacks(DbName, Options) ->
-    DbsDbName = config:get("mem3", "shard_db", "dbs"),
-    NodesDbName = config:get("mem3", "node_db", "nodes"),
+    DbsDbName = config:get("mem3", "shard_db", "_dbs"),
+    NodesDbName = config:get("mem3", "node_db", "_nodes"),
     IsReplicatorDb = DbName == config:get("replicator", "db", "_replicator") orelse
 	path_ends_with(DbName, <<"_replicator">>),
     IsUsersDb = DbName ==config:get("couch_httpd_auth", "authentication_db", "_users") orelse
@@ -151,6 +151,9 @@ check_dbname(#server{dbname_regexp=RegExp}, DbName) ->
         case DbName of
             "_users" -> ok;
             "_replicator" -> ok;
+            "_dbs" -> ok;
+            "_nodes" -> ok;
+            "_cassim" -> ok;
             _Else ->
                 {error, illegal_database_name, DbName}
             end;


Mime
View raw message