Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix-16222] Fix worker overload will casue task failed #16221

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ public void dispatchTask(TaskExecuteRunnable taskExecuteRunnable) throws TaskDis
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);
Expand Down
Loading