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


##########
src/config/src/config.erl:
##########
@@ -315,6 +315,19 @@ handle_call({delete, Sec, Key, Persist, Reason}, _From, 
Config) ->
             _ ->
                 ok
         end,
+    % If persistent, there will always be a delete marker just written
+    % in the last .ini file, so only reload in the non-persistent case.
+    Persist orelse
+        begin
+            IniMap = ini_map(Config#config.ini_files),
+            case maps:find({Sec, Key}, IniMap) of
+                % ?DELETE markers not inserted
+                {ok, Val} when is_list(Val) ->
+                    true = ets:insert(?MODULE, {{Sec, Key}, Val});
+                _ ->
+                    ok
+            end

Review Comment:
   It's definitely cleaner code to do it in both cases, but I thought you had 
previously argued against reloading .ini files in the case of `Persist=false`?



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