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


##########
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:
   [P2] Serialize this rollback with every same-field scalar update. 
`UPDATE_FIELD` now restores its captured `old_value` after a persistence 
failure and delays map/callback publication until persistence returns, but the 
transaction mutex below covers only `inverted_index_candidate_pushdown_ratio`. 
For another mutable bool/int/double starting at 1, persistent request A can 
assign 2 and block here; nonpersistent request B then assigns/publishes 3 and 
returns OK; when A fails it restores stale 1 while `full_conf_map` and the 
callback still report 3. If A succeeds, it can instead publish stale 2 after B 
while the registered value remains 3. The config endpoint runs concurrently, so 
please serialize assign/validate/persist/commit-or-rollback per field (or 
globally) for all scalar types, and add a blocked persistent-writer plus 
successful nonpersistent-writer test.



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