CryoThrust commented on PR #12152:
URL: https://github.com/apache/seatunnel/pull/12152#issuecomment-5602119671

   I traced the downstream path before answering this. I agree that completing 
`checkpointCoordinatorFuture` is O(1) and would unblock `join()` callers, but 
it is not sufficient by itself: `JobMaster.handleCheckpointError()` is the path 
that calls `SubPlan.handleCheckpointError()`, transitions the pipeline to 
`CANCELING`, and lets the state process cancel the physical/coordinator tasks. 
Completing the future alone would therefore risk reporting `FAILED` while 
leaving active task cancellation to some unrelated teardown path.
   
   I would keep that direct completion only as a last-resort safety signal, and 
pair it with a non-blocking fallback dispatch of the existing 
`handleCoordinatorError` path on an executor that is independent of the 
coordinator executor being shut down. The fallback should be idempotent (the 
existing `checkpointCoordinatorFuture.isDone()` guard can be the first gate), 
emit a WARN with the pipeline/master lifecycle context, and have a 
bounded/lifecycle-aware policy so it cannot keep the JVM alive after the 
JobMaster is gone. If the project does not want a second executor, an explicit 
design choice to complete-only should document that task cancellation is 
guaranteed by JobMaster teardown and add a regression test proving that 
guarantee; the current code path does not establish it.
   
   For tests, I would cover three separate invariants: (1) normal executor 
availability still handles the error asynchronously and cancels the pipeline; 
(2) a rejected submission completes the checkpoint future so a `join()` waiter 
cannot remain parked; and (3) the rejected path still reaches cancellation (or 
documents and verifies the alternate teardown owner), without invoking the full 
state-machine traversal on the Hazelcast operation thread. This keeps the 
threading fix and the failure-state semantics independently observable.


-- 
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]

Reply via email to