DanielLeens opened a new issue, #12118:
URL: https://github.com/apache/seatunnel/issues/12118

   ## Description
   
   This is a focused task for the worker-to-master terminal-state notification 
path. It is not a regression report.
   
   Verified at `dev` commit `97d461bc0773399d632fd078735736ecd44f5f0b`:
   
   - `TaskExecutionService.notifyTaskStatusToMaster` 
(`TaskExecutionService.java:702-706`): the Javadoc (`:695-701`) states it 
"retries indefinitely until successful or the service is shutdown"; the loop is 
`while (isRunning && !notifyStateSuccess)` with a fixed `sleepTime = 1000`; it 
exits on success, `JobNotFoundException`, or service shutdown, and the 
`JobRestoreInProgressException` branch explicitly asks the worker to keep 
retrying.
   - One asynchronous completion callback is issued per task-group execution 
(`:605-606`), not per intermediate state transition.
   - The delivered `TaskExecutionState` carries the terminal `executionState` 
and `throwableMsg`. The master's `IMap` does not contain an undelivered 
terminal event, so this RPC is the only carrier of that fact.
   
   Impact: while the master is unreachable (partition, slow election), every 
completed task group parks one worker thread in this loop; combined with the 
unbounded worker pool, thread count grows with completions rather than with 
running work.
   
   Constraint: the terminal fact must never be abandoned. A temporary RPC 
interruption recovers without any master switch, and dropping the notification 
would remove the event needed for normal terminal-state convergence.
   
   ## Expected outcome
   
   - Retain pending terminal events (a small local outbox) instead of holding a 
thread per event.
   - Bound delivery concurrency and per-cycle attempts with backoff; do not let 
a single drain thread block indefinitely on one RPC.
   - Any give-up requires an authoritative acknowledgement or an explicit, 
implemented, and tested master-pull reconciliation protocol.
   - Test: block the notify RPC to the master, assert a bounded worker thread 
count, then unblock and assert every terminal state is delivered exactly once.
   


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