DanielLeens commented on issue #12342: URL: https://github.com/apache/seatunnel/issues/12342#issuecomment-5697151254
Thanks for separating this from #12156. The current `dev` path confirms the check-then-act boundary: `cancelJob()` and `stopJob()` read the state before entering the synchronized `updateJobState(...)` transition, while `startJob()` and `stateProcess()` use the same `PhysicalPlan` monitor. A job can therefore cease to be not-started between the outer read and the transition. Please keep this as a separate follow-up, but do not build it on the current ordinal predicates: #12156 has not merged and its current Build is failing. After that PR is green and merged, rebase this work and make one synchronized helper own the state read, exact not-started classification, transition, and direct completion side effect. The helper must preserve the agreed `INITIALIZING` / `CREATED` / `PENDING` direct-cancel behavior while using the then-current explicit status set rather than reintroducing an ordinal range. The regression needs a deterministic latch-based interleaving, not only static state assertions: arrange for the old outer observation to see a not-started state, advance the plan to `SCHEDULED` or `RUNNING` before the guarded decision, and prove the normal cancelling/drain path wins. Cover both cancel and stop, and audit the resulting monitor ordering against `startJob()` / `stateProcess()` before proposing a PR. -- 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]
