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

   Agreed: using the first snapshot changed the cancel/start ordering. I 
restored the second state read after the terminal guard and kept the explicit 
`INITIALIZING`/`CREATED`/`PENDING` set. `stopJob()` keeps its existing 
observation timing. This does not make the check and transition atomic; that 
broader race remains in #12342.
   
   The old crossing-state assertion enforced the wrong result. Its replacement 
returns PENDING to the terminal guard, then exposes the real RUNNING state. It 
checks CANCELING, verifies that the running pipeline is marked before 
`cancelPipeline()` is invoked, and requires the job-end future to stay 
incomplete while cancellation has not completed. Temporarily restoring the 
first-snapshot decision makes this test fail with `CANCELING` expected and 
`CANCELED` observed.
   
   The existing batch-cancel integration test still waits for both jobs to be 
RUNNING before cancellation. It now requires successful status queries and 
waits for terminal cancellation. The deterministic unit case covers the 
intervening start; the container test covers ordinary running-job cancellation, 
not a forced distributed cancel/start race.
   
   On JDK 11, `JobStatusTest` (2 cases) and `StateTransitionCleanupTest` (21 
cases) pass after restoring the second read. The real Zeta/Bash batch-cancel 
container case also passes using the freshly packaged starter JAR. All 45 
modules of the starter/E2E dependency reactor pass skip-tests 
install/verification; scoped Spotless and whitespace checks pass. Fresh CI for 
this revision is separate from the older successful Build.
   


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