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


##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java:
##########
@@ -187,32 +185,49 @@ private WorkloadGroup(long id, String name, Map<String, 
String> properties, long
             this.properties.put(SLOT_MEMORY_POLICY, 
SLOT_MEMORY_POLICY_DEFAULT_VALUE);
         }
 
-        if (properties.containsKey(ENABLE_MEMORY_OVERCOMMIT)) {
-            properties.put(ENABLE_MEMORY_OVERCOMMIT, 
properties.get(ENABLE_MEMORY_OVERCOMMIT).toLowerCase());
+        if (properties.containsKey(MAX_CPU_PERCENT)) {
+            String cpuHardLimitStr = properties.get(MAX_CPU_PERCENT);
+            if (cpuHardLimitStr.endsWith("%")) {
+                cpuHardLimitStr = cpuHardLimitStr.substring(0, 
cpuHardLimitStr.length() - 1);
+            }
+            this.properties.put(MAX_CPU_PERCENT, cpuHardLimitStr);
         } else {
-            properties.put(ENABLE_MEMORY_OVERCOMMIT, "false");
+            this.properties.put(MAX_CPU_PERCENT, MAX_CPU_PERCENT_DEFAULT_VALUE 
+ "");
         }
 
-        if (properties.containsKey(CPU_HARD_LIMIT)) {
-            String cpuHardLimitStr = properties.get(CPU_HARD_LIMIT);
+        if (properties.containsKey(MIN_CPU_PERCENT)) {
+            String cpuHardLimitStr = properties.get(MIN_CPU_PERCENT);
             if (cpuHardLimitStr.endsWith("%")) {
                 cpuHardLimitStr = cpuHardLimitStr.substring(0, 
cpuHardLimitStr.length() - 1);
             }
-            this.properties.put(CPU_HARD_LIMIT, cpuHardLimitStr);
+            this.properties.put(MIN_CPU_PERCENT, cpuHardLimitStr);
         } else {
-            this.properties.put(CPU_HARD_LIMIT, CPU_HARD_LIMIT_DEFAULT_VALUE + 
"");
+            this.properties.put(MIN_CPU_PERCENT, "0");
         }
 
-        if (properties.containsKey(MEMORY_LIMIT)) {
-            String memHardLimitStr = properties.get(MEMORY_LIMIT);
+        if (properties.containsKey(MAX_MEMORY_PERCENT)) {
+            String memHardLimitStr = properties.get(MAX_MEMORY_PERCENT);
             // If the input is -1, it means use all memory, in this version we 
could change it to 100% now
             // since sum of all group's memory could be larger than 100%
             if (memHardLimitStr.equals("-1")) {

Review Comment:
   max_memory_percent could not be -1 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