yiguolei commented on code in PR #54243:
URL: https://github.com/apache/doris/pull/54243#discussion_r2254025857
##########
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:
换个角度理解,min cpu percent的含义是,当系统资源不足的时候,当前group 至少保留的资源量。 所以当配置成0的时候,实际使用50%
是合理的。
--
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]