wangbo commented on code in PR #51465:
URL: https://github.com/apache/doris/pull/51465#discussion_r2125874048
##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java:
##########
@@ -371,16 +375,18 @@ public void alterWorkloadGroup(AlterWorkloadGroupStmt
stmt) throws DdlException
}
public void alterWorkloadGroup(String computeGroup, String
workloadGroupName, Map<String, String> properties)
- throws DdlException {
+ throws UserException {
if (properties.size() == 0) {
throw new DdlException("Alter workload group should contain at
least one property");
}
+ ComputeGroup cg =
Env.getCurrentEnv().getComputeGroupMgr().getComputeGroupByName(computeGroup);
WorkloadGroup newWorkloadGroup;
WorkloadGroupKey wgKey = WorkloadGroupKey.get(computeGroup,
workloadGroupName);
writeLock();
try {
- WorkloadGroup currentWorkloadGroup =
getWorkloadGroupByComputeGroupUnlock(wgKey);
+ // get 0 idx here because there can only be one wg in cg with
specify wg name.
+ WorkloadGroup currentWorkloadGroup =
cg.getWorkloadGroup(workloadGroupName).get(0);
Review Comment:
会返回0的情况是be都挂了的时候,可能走不到这, 应该在scannode那就挂了。不过也可以加一个防御策略,在getWorkloadGroup内部判断下吧
--
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]