SEZ9 commented on issue #12622: URL: https://github.com/apache/seatunnel/issues/12622#issuecomment-5987432210
Thanks for the detailed analysis. The reasoning looks sound: for a task that has not been deployed (isRunning == false), updateTaskState(CANCELED) in forceStop() only writes the state and stateProcess() returns early, so taskFuture is never completed and SubPlan's finished-task counter never advances. Could you confirm which commit/version of dev you reproduced this on and, if possible, attach the full job log so we can tie it to the #12511 reproduction? A straightforward fix would be to have forceStop() (or updateTaskState for end states) explicitly complete taskFuture with a CANCELED TaskExecutionState when the task is not running / not deployed, instead of relying on stateProcess(). Please double-check the same gap doesn't exist in other end-state transitions taken while isRunning is false (e.g. during SubPlan.prepareRestorePipeline()'s restore wait where tasks are reset to CREATED with fresh futures). Would you be willing to open a PR? A unit test covering forceStop() on a CREATED (never deployed) PhysicalVertex, asserting that taskFuture completes with CANCELED, would be valuable to prevent regressions. <!-- streview-comment:1528 --> -- 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]
