yiguolei commented on code in PR #48187: URL: https://github.com/apache/doris/pull/48187#discussion_r1968684342
########## fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java: ########## @@ -569,10 +578,26 @@ protected List<Long> getAvailableBackendIds(long jobId) throws LoadException { // user may be dropped, or may not set resource tag property. // Here we fall back to use replica tag tags = getTagsFromReplicaAllocation(job.getDbId(), job.getTableId()); + } else if (tags.isEmpty()) { + // NOTE: better not ConnectContext.getComputeGroup() here, because it could + // throw UserException if user's tag is invalid. + String computeGroupName = Env.getCurrentEnv().getAuth() + .getDefaultCloudCluster(job.getUserIdentity().getQualifiedUser()); + if (!StringUtils.isEmpty(computeGroupName)) { + computeGroup = Env.getCurrentEnv().getComputeGroupMgr() + .getComputeGroupByStringNames(computeGroupName); + } } } - BeSelectionPolicy policy = new BeSelectionPolicy.Builder().needLoadAvailable().addTags(tags).build(); - return Env.getCurrentSystemInfo().selectBackendIdsByPolicy(policy, -1 /* as many as possible */); + + if (computeGroup != null) { + BeSelectionPolicy policy = new BeSelectionPolicy.Builder().needLoadAvailable().build(); + return Env.getCurrentSystemInfo() + .selectBackendIdsByPolicy(policy, -1 /* as many as possible */, computeGroup.getBackendList()); + } else { + BeSelectionPolicy policy = new BeSelectionPolicy.Builder().needLoadAvailable().addTags(tags).build(); + return Env.getCurrentSystemInfo().selectBackendIdsByPolicy(policy, -1 /* as many as possible */); Review Comment: 上面这两个方法是有矛盾的 因为policy 里的tags 属性定义了一部分,然后还有compute group。 tags 过滤的backends 跟compute group 限定的backends 是啥关系? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org