nickva commented on code in PR #5451:
URL: https://github.com/apache/couchdb/pull/5451#discussion_r1974591746


##########
src/config/src/config.erl:
##########
@@ -389,54 +365,47 @@ handle_call(reload, _From, #config{} = Config) ->
     % Update ets with ini values.
     IniMap = ini_map(IniFiles),
     maps:foreach(
-        fun({Sec, Key} = K, V) ->
-            VExisting = get(Sec, Key, V),
-            true = ets:insert(?MODULE, {K, V}),
+        fun({Sec, Key}, V) ->
+            VExisting = get_value(Sec, Key, undefined),
+            put_value(Sec, Key, V),
             case V =:= VExisting of
                 true ->
                     ok;
                 false ->
-                    couch_log:notice(
-                        "Reload detected config change ~s.~s = ~p",
-                        [Sec, Key, maybe_conceal(V, is_sensitive(Sec, Key))]
-                    ),
+                    InfoMsg = "Reload detected config change ~s.~s = ~p",
+                    InfoArgs = [Sec, Key, maybe_conceal(V, is_sensitive(Sec, 
Key))],
+                    couch_log:notice(InfoMsg, InfoArgs),

Review Comment:
   Agree, good idea. I was worried about these leaking out of other case 
clauses but then one can be just a plain `Msg` and `Args` and the other can 
have a more specific name



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to