git-hulk commented on code in PR #2989:
URL: https://github.com/apache/kvrocks/pull/2989#discussion_r2102265477
##########
src/config/config.cc:
##########
@@ -817,6 +818,8 @@ Status Config::parseConfigFromPair(const
std::pair<std::string, std::string> &in
field->line_number = line_number;
auto s = field->Set(input.second);
if (!s.IsOK()) return s.Prefixed(fmt::format("failed to set value of field
'{}'", field_key));
+ } else if (deprecated_fields_.find(field_key) != deprecated_fields_.end()) {
+ std::cout << fmt::format("The configuration '{}' at line {} is
deprecated.", field_key, line_number) << std::endl;
Review Comment:
Users will be confused if we directly remove the configuration and print a
warning message with an invalid key. So we add a dedicated set to log
deprecated fields here.
--
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]