wangbo commented on code in PR #54243:
URL: https://github.com/apache/doris/pull/54243#discussion_r2254013663


##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java:
##########
@@ -261,69 +293,98 @@ public static WorkloadGroup copyAndUpdate(WorkloadGroup 
currentWorkloadGroup, Ma
     private static void checkProperties(Map<String, String> properties) throws 
DdlException {
         for (String propertyName : properties.keySet()) {
             if (!ALL_PROPERTIES_NAME.contains(propertyName)) {
-                throw new DdlException("Property " + propertyName + " is not 
supported.");
+                throw new DdlException("Property " + propertyName + " is not 
supported, maybe it is deprecated.");
             }
         }
 
-        if (properties.containsKey(CPU_SHARE)) {
-            String inputValue = properties.get(CPU_SHARE);
+        int minCpuPercent = 0;
+        if (properties.containsKey(MIN_CPU_PERCENT)) {
+            String inputValue = properties.get(MIN_CPU_PERCENT);
+            String minCpuPercentStr = inputValue;
             try {
-                int cpuShareI = Integer.parseInt(inputValue);
-                if (cpuShareI <= 0 && cpuShareI != -1) {
+                if (minCpuPercentStr.endsWith("%")) {
+                    minCpuPercentStr = minCpuPercentStr.substring(0, 
minCpuPercentStr.length() - 1);
+                }
+
+                minCpuPercent = Integer.parseInt(minCpuPercentStr);

Review Comment:
   If user create wg1(minCpuPercent=0), then create wg2(minCpuPercent=0), How 
should users understand this configuration? In CGroup, wg1 is 50% and wg2 is 
50% when cpu is full. This means cpushares can not express the min cpu usage.



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