This is an automated email from the ASF dual-hosted git repository.
xincheng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 02bef74296 Fix worker overload will casue task failed (#16221)
02bef74296 is described below
commit 02bef74296c3467244144fc9ab69bc5a633a24cf
Author: Wenjun Ruan <[email protected]>
AuthorDate: Thu Jun 27 13:37:13 2024 +0800
Fix worker overload will casue task failed (#16221)
---
.../server/master/runner/BaseTaskDispatcher.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/BaseTaskDispatcher.java
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/BaseTaskDispatcher.java
index 30ab8fadec..793ae378d0 100644
---
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/BaseTaskDispatcher.java
+++
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/BaseTaskDispatcher.java
@@ -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);