jjj-n opened a new pull request, #12265: URL: https://github.com/apache/seatunnel/pull/12265
### Purpose of this pull request Separate coordinator admission from job lifecycle execution as the first slice of #12117. `JobMaster.run()` waits for the job to finish, and completion/control paths can submit more work and wait for it. They currently share the executor used to initialize new submissions. This change gives lifecycle work its own cached executor and the permanent pending-job scheduler its own single-thread executor, so admission saturation does not prevent existing jobs from completing, being canceled, taking checkpoints/savepoints, or recovering after master reactivation. Both newly submitted and restored JobMasters receive the lifecycle executor. Job lifetime waiting, connector-JAR cleanup, and exceptional completion retain their existing ordering. The running-master entry is removed by instance identity so a late exit cannot remove a replacement master. All three executors are stopped on step-down and recreated before reactivation. This PR keeps the existing configuration keys and defaults. It does not bound lifecycle threads or eliminate the per-job lifetime waiter. The lifecycle executor deliberately retains an unbounded maximum with direct handoff while nested blocking dependencies remain. A finite admission default and queue/rejection policy are deferred until this slice has merged and its saturation/recovery contract is established. #12165 is out of scope. ### Does this PR introduce _any_ user-facing change? The coordinator core/max settings and thread-pool metrics now apply to admission work. Lifecycle/control and recovery work use a separate executor; these settings are not a limit on running jobs or total master threads. English and Chinese deployment guides and upgrade notes describe this scope. No configuration keys, default values, or submission rejection policy are changed. ### How was this patch tested? Validated in Linux with Temurin 17.0.17 and Maven 3.9.11: - Repository-wide `spotless:apply`; engine-server plus its 40-module reactor built and installed with tests skipped and UI generation disabled. - 69 selected regression tests passed with no failures or skips: 19 coordinator scheduling/lifecycle tests, 3 new real-engine saturation tests, 11 job-cleanup tests, 8 pipeline-cleanup tests, 10 JobMaster tests, 3 master-failover resource tests, and 15 checkpoint-coordinator tests. Java 17 tests used `--add-opens=java.base/java.lang=ALL-UNNAMED` and `--add-opens=java.base/java.util=ALL-UNNAMED` for the existing JUnit Pioneer environment-variable extension. - Negative control: routing only `savePoint()` back to the saturated admission executor makes the new savepoint test fail with `RejectedExecutionException`. Restoring lifecycle routing and recompiling makes the same test pass. - Final -q -DskipTests verify passed for engine-server and its 40-module dependency reactor (UI generation disabled). Added deterministic saturation tests for pending-job dispatch/completion, replacement-master ownership, and executor reactivation. Added real engine tests for checkpoint/savepoint completion, terminal history lookup, cancellation, and restore/forced stop after master reactivation while the admission worker is held by a latch. ### Check list * [x] No new JAR dependency. * [x] English and Chinese configuration documentation updated. * [x] Existing configuration keys and defaults retained. * [x] Local verification results recorded before submission. -- 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]
