This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 2ac877fccfe branch-3.1: [fix](config) dynamic set FE masterOnly config 
will lost after change MASTER #54409 (#54603)
2ac877fccfe is described below

commit 2ac877fccfe7b5aec2936ddab4b29b774788ae7e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Aug 14 17:30:11 2025 +0800

    branch-3.1: [fix](config) dynamic set FE masterOnly config will lost after 
change MASTER #54409 (#54603)
    
    Cherry-picked from #54409
    
    Co-authored-by: camby <[email protected]>
---
 .../java/org/apache/doris/analysis/AdminSetConfigStmt.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/AdminSetConfigStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/AdminSetConfigStmt.java
index 458116924d7..b197c6c2bca 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AdminSetConfigStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AdminSetConfigStmt.java
@@ -49,11 +49,13 @@ public class AdminSetConfigStmt extends DdlStmt implements 
NotFallbackInParser {
         }
         this.applyToAll = applyToAll;
 
-        // we have to analyze configs here to determine whether to forward it 
to master
-        for (String key : this.configs.keySet()) {
-            if (ConfigBase.checkIsMasterOnly(key)) {
-                redirectStatus = RedirectStatus.FORWARD_NO_SYNC;
-                this.applyToAll = false;
+        if (!this.applyToAll) {
+            // we have to analyze configs here to determine whether to forward 
it to master
+            for (String key : this.configs.keySet()) {
+                if (ConfigBase.checkIsMasterOnly(key)) {
+                    redirectStatus = RedirectStatus.FORWARD_NO_SYNC;
+                    break;
+                }
             }
         }
     }


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

Reply via email to