airborne12 commented on code in PR #67180:
URL: https://github.com/apache/doris/pull/67180#discussion_r4093549889


##########
be/src/common/config.cpp:
##########
@@ -2369,14 +2385,18 @@ bool init(const char* conf_file, bool fill_conf_map, 
bool must_exist, bool set_t
                                                                          
(FIELD).name, new_value); \
             }                                                                  
                    \
         }                                                                      
                    \
+        if (PERSIST) {                                                         
                    \
+            Status persist_status = persist_config(std::string((FIELD).name), 
VALUE);              \
+            if (!persist_status.ok()) {                                        
                    \
+                ref_conf_value = old_value;                                    
                    \

Review Comment:
   Confirmed with a controlled same-field interleaving. Before the fix, a 
persistent update to 2 paused after assignment, a nonpersistent update to 3 
returned OK, and the first request's persistence failure rolled the raw value 
back to 1 while the config map and callback still held 3. The new ASAN test 
failed on that raw value.
   
   Commit 41b58ac570e serializes the complete `set_config` update under the 
existing config mutex for all supported scalar and string fields, and removes 
the ratio-specific mutex. The same test now passes; the selected ASAN BE UT run 
passed 32/32 tests. The full PR merge-tree clang-format and English pre-push 
gates also pass. CI for this head is pending.



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