github-actions[bot] commented on code in PR #63822:
URL: https://github.com/apache/doris/pull/63822#discussion_r3331563192


##########
cloud/src/common/configbase.cpp:
##########
@@ -504,17 +505,30 @@ std::pair<bool, std::string> update_config(const 
std::string& configs, bool pers
     std::unordered_map<std::string, std::string> conf_map;
     std::istringstream ss(configs);
     std::string conf;
+    std::string key;
+    std::string val;
+    auto add_config = [&]() {
+        if (!key.empty()) {

Review Comment:
   This now silently drops malformed entries whose key is empty. For example, 
`update_config("recycle_blacklist=a,=b", false, "")` reaches `add_config()` 
with an empty trimmed key for the second entry, skips it because of this guard, 
and returns success after applying only `recycle_blacklist=a`. Before this 
parser rewrite the same empty key was inserted into the map and `set_config` 
failed with `config field= not exists`, so callers could detect the bad 
request. Please reject empty keys instead of ignoring them, including after 
trimming, so the update API does not report success for partially malformed 
config strings.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to