Rangsh commented on PR #12218:
URL: https://github.com/apache/seatunnel/pull/12218#issuecomment-7119169406

   @SEZ9 @DanielLeens @zhangshenghang — follow-up on the dropped-task / 
lifecycle review items, addressed on **`e778df2e24`**.
   
   ## Production (`TaskExecutionService`)
   
   1. **Full blocking batch registered up front** — 
`registerExpectedBlockingTasks(tasks)` runs before the submit loop, so a 
mid-batch rejection still accounts for **unvisited tails** (e.g. task `4L` in 
partial-submit).
   2. **Do not `taskDone` running blocking workers early** — 
`markBlockingWorkerEnteredRun` is set when `BlockingWorker.run()` starts; 
`accountForTasksDroppedAfterRollback` skips those ids instead of treating 
`isCancelled() && isDone()` on an interrupted but still-unwinding future as 
“never started”.
   3. **Cooperative teardown on rollback** — queued cooperative trackers 
removed from `threadShareTaskQueue` are `close()`d (with task classloader) 
before `taskDone`; cooperative workers on rollback / interrupt paths call the 
same close helper; a final sweep closes initialized cooperative tasks that are 
not running on a cooperative worker and not yet `taskDone`.
   
   ## Tests (`TaskExecutionServiceTest`, now **28** tests)
   
   | Case | Test / assertion |
   |------|------------------|
   | Unvisited blocking tail + failed generation completes | 
`testDeployLocalTaskRollsBackAfterPartialBlockingSubmitRejection` — **4 
tasks**, `awaitFailedGenerationTerminalState` → **FAILED**, tail `4L` never 
enters `call()` |
   | Cancelled before `BlockingWorker` starts + tail reject | **New** 
`testRollbackAccountsBlockingCancelledBeforeWorkerStarts` — single-thread pool, 
tasks `10L/11L/12L`, direct terminal **FAILED** |
   | (Cooperative close) | Covered in production paths above; reliable 
deterministic close assertion is still hard when the buswork dequeues 
immediately — happy to add if you want a narrower unit harness |
   
   Local: `TaskExecutionServiceTest` **28/28**; `spotless:apply` + module 
`verify` on this head.
   
   Issues **2–8** from earlier rounds remain as on `e3a9b8eb` (Javadoc, 
`TaskGroupContext` setters, test hygiene, PR description) — unchanged in this 
commit beyond the accounting/close fixes above.
   
   Fork Build will re-run on push. Thanks again for the detailed review.


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