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


##########
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:
   ```suggestion
                       Msg = "Reload detected config change ~s.~s = ~p",
                       Args = [Sec, Key, maybe_conceal(V, is_sensitive(Sec, 
Key))],
                       couch_log:notice(Msg, Args),
   ```
   The current variable names imply they will be used in a `couch_log:info` 
call, but I think it's nicer to use these more generic terms anyway.



-- 
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