zhangshenghang opened a new pull request, #11653: URL: https://github.com/apache/seatunnel/pull/11653
### Purpose of this pull request Follow up the failover lifecycle fix from apache/seatunnel#10865 with the pending scheduler concurrency guard that was proven in WhaleOps/whaletunnel#2686. When an old pending-job scheduler is still blocked in resource pre-check and a new scheduler is started during rapid master failover/repromotion, both schedulers can observe the same pending queue head. This patch reserves pending jobs while their resource pre-check is in progress, invalidates stale scheduler generations, and wakes waiting schedulers when reservations are released or coordinator state is cleared. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - `./mvnw -B -pl seatunnel-engine/seatunnel-engine-server spotless:apply -Dmaven.gitcommitid.skip=true -Dlicense.skipAddThirdParty=true` - `./mvnw -B -pl seatunnel-engine/seatunnel-engine-server -Dtest=CoordinatorServiceTest#testPendingJobSchedulerIgnoresJobReservedByPreviousScheduler+testPendingJobSchedulerCanAdvanceNextJobWhenPreviousResourceCheckBlocks -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.gitcommitid.skip=true -Dlicense.skipAddThirdParty=true test` - `./mvnw -B -pl seatunnel-engine/seatunnel-engine-server -DskipTests -Dmaven.gitcommitid.skip=true -Dlicense.skipAddThirdParty=true verify` - `./mvnw -q -DskipTests -Dmaven.gitcommitid.skip=true -Dlicense.skipAddThirdParty=true verify` Note: before the focused test could run in this fresh worktree, I installed the local snapshot prerequisite chain so `seatunnel-engine-server` used the current `seatunnel-engine-core` sources instead of an older remote snapshot. -- 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]
