zhangshenghang opened a new pull request, #13505: URL: https://github.com/apache/seatunnel/pull/13505
Yes — this change is contributed to **Apache SeaTunnel**. ## What this PR adds One Zeta engine E2E, `PendingJobForceStopLifecycleIT`, that force-stops a job which never left the pending queue and pins the lifecycle contract of that path. A job that cannot obtain its slots under `job.schedule.strategy = WAIT` is a fully registered job: the coordinator holds a `JobMaster` for it and the client holds a completion future. Force-stopping it uses the `force` variant of the cancel RPC, which is routed to `CoordinatorService#stopJob` and then to `PhysicalPlan#stopJob` — **not** to a savepoint. The test asserts that the stop path: 1. resolves the client completion future as `CANCELED` (the RPC itself is also bounded, so a blocked stop fails the test instead of hanging it); 2. persists `CANCELED`, so the status stays resolvable *after* the coordinator releases the job master (this is the point where the reported symptom was `UNKNOWABLE` instead); 3. removes the job from the pending queue and never dispatches it afterwards, even when the capacity it was waiting for is released; 4. leaves the fixed-slot pool fully reusable: the queued job owns no slot, and a replacement job with the same four-slot footprint reaches `RUNNING`. It also asserts that force-stopping a queued job does not trigger a final checkpoint. ## Why this boundary has real regression risk `PhysicalPlan#stopJob` has a dedicated `status <= PENDING` branch that completes the job-end future directly, because `JobMaster#run` — the code that normally drives the terminal-state transition, the job-history write and the coordinator-side unregistration — is never entered for a queued job. Any change to terminal cleanup, pending-queue bookkeeping or the fixed-slot lifecycle can silently break one of the guarantees above while ordinary submission still works: a queued job is invisible to the resource dashboard, and a leaked registration only surfaces later as `UNKNOWABLE` or as capacity that never comes back. ## Why existing coverage does not reach it - `CoordinatorServiceWithCancelPendingJobTest` builds a `JobMaster` directly and calls the coordinator in-process; it never goes through the client protocol, the RPC force flag, real slots or the completion future. - `SplitClusterPendingJobLifecycleFailoverIT` covers pending jobs waiting for resources and a master handoff, but never force-stops the queued job itself. - `JobClientJobProxyIT` cancels jobs that are already `RUNNING`. No existing E2E pins the "queued job force-stop" terminal contract. ## How it was verified - Cluster: in-process split cluster (one master, one worker), `dynamic-slot: false`, `slot-num: 4`, `job.schedule.strategy: WAIT`, REST disabled. - Job fixture: the existing `pending_jobs_streaming.conf` (FakeSource → InMemory), two jobs of the same footprint created from it — one holder, one victim. - Positive runs on `dev` (`ee0fb0d72f`): 36.5 s and 37.3 s, both green, including the `during(5s)` "never revived" window. - Negative control: dropping `completeJobEndFuture(new JobResult(JobStatus.CANCELED, null))` from `PhysicalPlan#stopJob` makes the test fail exactly at the first assertion with `expected: <CANCELED> but was: <UNKNOWABLE>` — the reported symptom — and the change was reverted afterwards. - `mvn spotless:apply` applied; the module compiles and the IT passes. Test-only change: no production code is modified. Related to #13479. -- 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]
