diff options
author | Jay Doane <jaydoane@apache.org> | 2021-06-14 17:19:21 -0700 |
---|---|---|
committer | Jay Doane <jay.s.doane@gmail.com> | 2021-06-15 14:48:53 -0700 |
commit | 8ac1978d78af2fc288bed1a99c092c44632ac35a (patch) | |
tree | 2e5cdf4dc9d82c9b2068ac2893273ca748a10559 | |
parent | 491b77d82317478c574526490502f750b82814db (diff) | |
download | couchdb-8ac1978d78af2fc288bed1a99c092c44632ac35a.tar.gz |
Fix custodian default system dbs
These system db defaults were left unchanged when this code was
imported from Cloudant. This updates them to CouchDB defaults, by
using existing functions in the appropriate application and module.
h/t @chewbranca for discovering the issue, and also suggesting
a better way to obtain these config values.
-rw-r--r-- | src/chttpd/src/chttpd_auth_cache.erl | 2 | ||||
-rw-r--r-- | src/custodian/src/custodian_db_checker.erl | 2 | ||||
-rw-r--r-- | src/custodian/src/custodian_util.erl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/chttpd/src/chttpd_auth_cache.erl b/src/chttpd/src/chttpd_auth_cache.erl index fdae27b79..17a31bf55 100644 --- a/src/chttpd/src/chttpd_auth_cache.erl +++ b/src/chttpd/src/chttpd_auth_cache.erl @@ -13,7 +13,7 @@ -module(chttpd_auth_cache). -behaviour(gen_server). --export([start_link/0, get_user_creds/2, update_user_creds/3]). +-export([start_link/0, get_user_creds/2, update_user_creds/3, dbname/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([listen_for_changes/1, changes_callback/2]). diff --git a/src/custodian/src/custodian_db_checker.erl b/src/custodian/src/custodian_db_checker.erl index 10502dd76..f9ab8c85e 100644 --- a/src/custodian/src/custodian_db_checker.erl +++ b/src/custodian/src/custodian_db_checker.erl @@ -132,7 +132,7 @@ get_dbs() -> get_users_db() -> - UsersDb = config:get("couch_httpd_auth", "authentication_db", "users"), + UsersDb = chttpd_auth_cache:dbname(), [list_to_binary(UsersDb)]. diff --git a/src/custodian/src/custodian_util.erl b/src/custodian/src/custodian_util.erl index 785bbd3da..df095bd7c 100644 --- a/src/custodian/src/custodian_util.erl +++ b/src/custodian/src/custodian_util.erl @@ -43,7 +43,7 @@ report() -> fold_dbs([], Fun). ensure_dbs_exists() -> - DbName = config:get("mem3", "shards_db", "dbs"), + DbName = mem3_sync:shards_db(), {ok, Db} = mem3_util:ensure_exists(DbName), ensure_custodian_ddoc_exists(Db), {ok, Db}. |