davidzollo commented on code in PR #10567:
URL: https://github.com/apache/seatunnel/pull/10567#discussion_r2932619086
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java:
##########
@@ -332,10 +332,18 @@ public TaskDeployState deployTask(@NonNull
TaskGroupImmutableInformation taskImm
synchronized (this) {
if
(executionContexts.containsKey(taskGroup.getTaskGroupLocation())) {
- throw new RuntimeException(
+ // Task is actively running (present in executionContexts,
not
+ // finishedExecutionContexts). This happens during master
failover: the new
+ // master restores state and tries to re-deploy tasks that
never stopped on
+ // the worker. Return success so the master reconnects
without interrupting
+ // the running task. The worker will notify the master of
the terminal state
+ // via NotifyTaskStatusOperation when the task eventually
completes.
+ logger.warning(
String.format(
- "TaskGroupLocation: %s already exists",
+ "TaskGroupLocation %s already exists and
is active, "
+ + "skipping redeploy for master
failover recovery",
taskGroup.getTaskGroupLocation()));
+ return TaskDeployState.success();
Review Comment:
```suggestion
// Release classloaders acquired during deserialization
for (Map.Entry<Long, Collection<URL>> entry :
taskJars.entrySet()) {
classLoaderService.releaseClassLoader(
taskImmutableInfo.getJobId(), entry.getValue());
}
return TaskDeployState.success();
```
--
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]