wenzhenghu commented on code in PR #60559:
URL: https://github.com/apache/doris/pull/60559#discussion_r2780207378
##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadschedpolicy/WorkloadSchedPolicyMgr.java:
##########
@@ -244,27 +245,36 @@ public void createWorkloadSchedPolicy(String policyName,
boolean isIfNotExists,
}
}
- private boolean checkPolicyCondition(List<WorkloadCondition>
conditionList) throws UserException {
+ private Boolean checkPolicyCondition(List<WorkloadCondition>
conditionList) throws UserException {
if (conditionList.size() >
Config.workload_max_condition_num_in_policy) {
throw new UserException(
"condition num in a policy can not exceed " +
Config.workload_max_condition_num_in_policy);
}
- boolean containsFeMetric = false;
- boolean containsBeMetric = false;
+ boolean hasFeOnlyMetric = false;
+ boolean hasBeOnlyMetric = false;
for (WorkloadCondition cond : conditionList) {
- if (FE_METRIC_SET.contains(cond.getMetricType())) {
- containsFeMetric = true;
- }
- if (BE_METRIC_SET.contains(cond.getMetricType())) {
- containsBeMetric = true;
+ boolean isFe = FE_METRIC_SET.contains(cond.getMetricType());
Review Comment:
> 这里是为了改啥?
为了让检查通过。因为username同时是be和fe的condition,需要修改原来的检查逻辑
--
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]