nickva commented on code in PR #4813:
URL: https://github.com/apache/couchdb/pull/4813#discussion_r1364857681
##########
src/config/src/config.erl:
##########
@@ -326,6 +326,13 @@ handle_call({delete, Sec, Key, Persist, Reason}, _From,
Config) ->
"~p: [~s] ~s deleted for reason ~p",
[?MODULE, Sec, Key, Reason]
),
+ DiskKVs = parse_ini_files(Config#config.ini_files),
+ case dict:find({Sec, Key}, DiskKVs) of
+ {ok, DiskVal} ->
+ true = ets:insert(?MODULE, {{Sec, Key}, DiskVal});
+ error ->
+ ok
+ end,
Review Comment:
To emphasize that we're aiming to get the value that we'd get effectively
after a node restart or `reload()`, it might make sense to do the parsing and
reading after the write. That's just so we go through the same sequence of
operations: 1) parse from ini and 2) update ETS, that we'd perform when we
re-start the node or when we call `reload()`.
--
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]