deardeng commented on code in PR #48187:
URL: https://github.com/apache/doris/pull/48187#discussion_r1994639357
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java:
##########
@@ -555,24 +560,43 @@ public long getAvailableBeForTask(long jobId, long
previousBeId) throws LoadExce
* @throws LoadException
*/
protected List<Long> getAvailableBackendIds(long jobId) throws
LoadException {
+ // Usually Cloud node could not reach here(refer
CloudRoutineLoadManager.getAvailableBackendIds),
+ // check cloud mode here is just to be on the safe side.
+ if (Config.isCloudMode()) {
+ throw new LoadException("cloud mode should not reach here");
+ }
+
RoutineLoadJob job = getJob(jobId);
if (job == null) {
throw new LoadException("job " + jobId + " does not exist");
}
- Set<Tag> tags;
+ Set<Tag> tags = null;
+ ComputeGroup computeGroup = null;
if (job.getUserIdentity() == null) {
// For old job, there may be no user info. So we have to use tags
from replica allocation
tags = getTagsFromReplicaAllocation(job.getDbId(),
job.getTableId());
+ BeSelectionPolicy policy = new
BeSelectionPolicy.Builder().addTags(tags).needLoadAvailable().build();
+ return Env.getCurrentSystemInfo()
+ .selectBackendIdsByPolicy(policy, -1 /* as many as
possible */);
} else {
Review Comment:
这里是不可以不要else了啊,if 处理完就提前返回了?
--
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]