PragmaTwice commented on code in PR #1498:
URL:
https://github.com/apache/incubator-kvrocks/pull/1498#discussion_r1233254994
##########
src/config/config.cc:
##########
@@ -658,12 +658,16 @@ Status Config::parseConfigFromPair(const
std::pair<std::string, std::string> &in
field_key = input.first;
tokens[input.second] = input.first.substr(ns_str_size);
}
+
auto iter = fields_.find(field_key);
+
if (iter != fields_.end()) {
auto &field = iter->second;
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 {
+ std::cout << fmt::format("WARNING: '{}' is not a valid configuration
key!", field_key) << std::endl;
Review Comment:
```suggestion
std::cout << fmt::format("WARNING: '{}' at line {} is not a valid
configuration key.", field_key, line_number) << std::endl;
```
--
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]