mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-02 04:08:31 +08:00
Fix worker overload will casue task failed (#16223)
(cherry picked from commit 4a41e4290ec25bf1165ebc4f043baffb13729a72)
This commit is contained in:
parent
66b7d1274a
commit
f13f070242
@ -55,10 +55,11 @@ public abstract class BaseTaskDispatcher implements TaskDispatcher {
|
||||
taskInstanceDispatchHost = getTaskInstanceDispatchHost(taskExecuteRunnable)
|
||||
.orElseThrow(() -> new TaskDispatchException("Cannot find the host to execute task."));
|
||||
} catch (WorkerGroupNotFoundException workerGroupNotFoundException) {
|
||||
log.error("Dispatch task: {} failed, worker group not found.",
|
||||
taskExecuteRunnable.getTaskExecutionContext().getTaskName(), workerGroupNotFoundException);
|
||||
addDispatchFailedEvent(taskExecuteRunnable);
|
||||
return;
|
||||
// todo: this is a temporary solution, we should refactor the ServerNodeManager to make sure there won't
|
||||
// throw WorkerGroupNotFoundException unless the worker group is not exist in database
|
||||
throw new TaskDispatchException(
|
||||
"Dispatch task: " + taskExecuteRunnable.getTaskExecutionContext().getTaskName() + " failed",
|
||||
workerGroupNotFoundException);
|
||||
}
|
||||
taskExecuteRunnable.getTaskExecutionContext().setHost(taskInstanceDispatchHost.getAddress());
|
||||
doDispatch(taskExecuteRunnable);
|
||||
|
Loading…
Reference in New Issue
Block a user