deardeng commented on code in PR #66680:
URL: https://github.com/apache/doris/pull/66680#discussion_r3766367354


##########
fe/fe-common/src/main/java/org/apache/doris/common/Config.java:
##########
@@ -541,6 +550,40 @@ public class Config extends ConfigBase {
             + "a load job.")
     public static short min_load_replica_num = -1;
 
+    @ConfField(mutable = true, masterOnly = true, description = "Minimum 
number of successfully written replicas "
+            + "required in each availability zone for a load job.")
+    public static String[] cross_az_succ_quorum = {};
+
+    public static Map<String, Integer> getCrossAzSuccQuorum() {
+        String[] config = cross_az_succ_quorum;
+        if (config == cachedCrossAzSuccQuorumConfig) {
+            return cachedCrossAzSuccQuorum;
+        }
+        synchronized (Config.class) {
+            config = cross_az_succ_quorum;
+            if (config == cachedCrossAzSuccQuorumConfig) {
+                return cachedCrossAzSuccQuorum;
+            }
+            Map<String, Integer> parsedConfig = new HashMap<>();
+            for (String item : config) {
+                String[] parts = item.split(":", -1);
+                try {
+                    int configuredMin = Integer.parseInt(parts.length == 2 ? 
parts[1].trim() : "");
+                    if (parts[0].trim().isEmpty() || configuredMin < 0) {
+                        throw new NumberFormatException();
+                    }
+                    parsedConfig.put(parts[0].trim(), configuredMin);
+                } catch (NumberFormatException e) {

Review Comment:
   This behavior is intentional. Invalid entries are skipped while valid 
entries remain effective, and a warning is logged for observability. We do not 
want one malformed item to reject the entire dynamic configuration update, so 
no change is planned here.



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