summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chttpd/src/chttpd_auth_cache.erl16
-rw-r--r--src/couch/src/couch_compaction_daemon.erl2
2 files changed, 13 insertions, 5 deletions
diff --git a/src/chttpd/src/chttpd_auth_cache.erl b/src/chttpd/src/chttpd_auth_cache.erl
index 4d85b165b..638d8c748 100644
--- a/src/chttpd/src/chttpd_auth_cache.erl
+++ b/src/chttpd/src/chttpd_auth_cache.erl
@@ -73,8 +73,7 @@ get_from_cache(UserName) ->
couch_log:debug("cache hit for ~s", [UserName]),
Props;
_ ->
- couch_stats:increment_counter([couchdb, auth_cache_misses]),
- couch_log:debug("cache miss for ~s", [UserName]),
+ maybe_increment_auth_cache_miss(UserName),
case load_user_from_db(UserName) of
nil ->
nil;
@@ -84,11 +83,20 @@ get_from_cache(UserName) ->
end
catch
error:badarg ->
- couch_stats:increment_counter([couchdb, auth_cache_misses]),
- couch_log:debug("cache miss for ~s", [UserName]),
+ maybe_increment_auth_cache_miss(UserName),
load_user_from_db(UserName)
end.
+maybe_increment_auth_cache_miss(UserName) ->
+ Admins = config:get("admins"),
+ case lists:keymember(?b2l(UserName), 1, Admins) of
+ false ->
+ couch_stats:increment_counter([couchdb, auth_cache_misses]),
+ couch_log:debug("cache miss for ~s", [UserName]);
+ _True ->
+ ok
+ end.
+
%% gen_server callbacks
init([]) ->
diff --git a/src/couch/src/couch_compaction_daemon.erl b/src/couch/src/couch_compaction_daemon.erl
index 72d5a17e2..1a535dba7 100644
--- a/src/couch/src/couch_compaction_daemon.erl
+++ b/src/couch/src/couch_compaction_daemon.erl
@@ -192,7 +192,7 @@ maybe_compact_db(Parent, DbName, Config) ->
couch_db:close(Db);
{error, Reason} ->
couch_db:close(Db),
- couch_log:error("Compaction daemon - an error ocurred while"
+ couch_log:error("Compaction daemon - an error occurred while"
" compacting the database `~s`: ~p", [DbName, Reason])
end,
case ViewsMonRef of