yiguolei commented on code in PR #32554:
URL: https://github.com/apache/doris/pull/32554#discussion_r1532292883


##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java:
##########
@@ -284,6 +306,51 @@ private static void checkProperties(Map<String, String> 
properties) throws DdlEx
                 throw new DdlException(QUEUE_TIMEOUT + " requires a positive 
integer");
             }
         }
+
+        int lowWaterMark = SPILL_LOW_WATERMARK_DEFAULT_VALUE;
+        if (properties.containsKey(SPILL_THRESHOLD_LOW_WATERMARK)) {
+            String lowVal = properties.get(SPILL_THRESHOLD_LOW_WATERMARK);
+            if (lowVal.endsWith("%")) {
+                lowVal = lowVal.substring(0, lowVal.length() - 1);
+            }
+            try {
+                int intValue = Integer.parseInt(lowVal);
+                if ((intValue < 1 || intValue > 100) && intValue != -1) {
+                    throw new NumberFormatException();
+                }
+                lowWaterMark = intValue;
+            } catch (NumberFormatException e) {
+                throw new DdlException(
+                        SPILL_THRESHOLD_LOW_WATERMARK
+                                + " must be a positive integer(1 ~ 100) or -1. 
but input value is "

Review Comment:
   remove -1, it should always between [1,100]
   



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