github-actions[bot] commented on code in PR #65049:
URL: https://github.com/apache/doris/pull/65049#discussion_r3502619173
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java:
##########
@@ -616,18 +616,27 @@ protected List<Long> getAvailableBackendIds(long jobId)
throws LoadException {
}
if (computeGroup != null &&
!ComputeGroup.INVALID_COMPUTE_GROUP.equals(computeGroup)) {
- BeSelectionPolicy policy = new
BeSelectionPolicy.Builder().needLoadAvailable().build();
+ BeSelectionPolicy policy = buildAvailableBackendPolicy(null);
return Env.getCurrentSystemInfo()
.selectBackendIdsByPolicy(policy, -1 /* as many as
possible */,
computeGroup.getBackendList());
} else {
- BeSelectionPolicy policy = new
BeSelectionPolicy.Builder().addTags(tags).needLoadAvailable().build();
+ BeSelectionPolicy policy = buildAvailableBackendPolicy(tags);
return Env.getCurrentSystemInfo()
.selectBackendIdsByPolicy(policy, -1 /* as many as
possible */);
}
}
}
+ static BeSelectionPolicy buildAvailableBackendPolicy(Set<Tag> tags) {
+ BeSelectionPolicy.Builder builder = new
BeSelectionPolicy.Builder().needLoadAvailable()
+ .needNonDecommissioned();
+ if (tags != null) {
Review Comment:
getAvailableBackendIds() now removes decommissioning BEs from
availableBeIds, but the fallback below can still hand the scheduler the old BE.
If previousBeId is decommissioning it is not in availableBeIds, so the
previous-BE block is skipped and previousBeIdleTaskNum stays 0. When every
eligible BE is already saturated, the loop leaves maxIdleSlotNum at 0, and the
tie check later returns previousBeId;
RoutineLoadTaskScheduler.allocateTaskToBe() then assigns that returned id to
the task. Please only reuse the previous BE when it was still eligible, or
return the selected eligible BE / -1 in the saturated case, and add a test with
a decommissioning previous BE plus saturated eligible 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: [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]