zhangshenghang opened a new pull request, #13339: URL: https://github.com/apache/seatunnel/pull/13339
Yes. ## Purpose of the change Fixes #13317 Terminal task-status reports are delivered with **indefinite retries** (`TaskExecutionService.notifyTaskStatusToMaster`, including a dedicated `JobRestoreInProgressException` retry path), so the report of an old attempt is mechanically guaranteed to be deliverable **after** a master finishes restoring. The receiving `PhysicalVertex` could not tell attempts apart: after the restore's `reset()` reopened the end-state guard, the ghost event overwrote the new attempt's state (a late FAILED/CANCELED killed the healthy restored pipeline and burned retry budget; a late FINISHED corrupted the end-state accounting), and `JobMaster.updateTaskExecutionState` released the task-group resource for **any** terminal event — freeing the slot the new attempt had just obtained. ## Brief change log - `TaskExecutionState`: new nullable `executionId` field (plain `Serializable`; the class javadoc explicitly keeps the serialVersionUID for compatible field additions, old instances deserialize it as null) plus a getter and one new constructor. All existing constructors leave it null. - `TaskExecutionService` (`TaskGroupExecutionTracker.taskDone`): the three terminal completions now tag the state with `context.getExecutionId()` — the deployment id the worker already tracks. - `PhysicalVertex`: remembers the `executionId` it issued for the current deployment (`getTaskGroupImmutableInformation`), forgets it on `reset()`, and `updateStateByExecutionService` now returns `boolean`, dropping an event whose non-null id differs from the current deployment's id. Events without an id (locally synthesized states, master-side synthetic events) keep the previous behavior. - `JobMaster.updateTaskExecutionState`: releases the task-group resource only when the event was actually applied — a dropped ghost event must not free the current attempt's slot. Compatibility: same engine version across the cluster is already a Zeta requirement; events without an id are accepted exactly as before. ## Verifying this change Extended `PhysicalVertexTest`: - `shouldDropTerminalEventsFromPreviousDeploymentAttempts`: an event carrying the previous deployment's id is dropped (returns false, state unchanged) while the current deployment's event is applied; - `shouldAcceptTerminalEventsWithoutExecutionId`: legacy/synthetic events without an id are applied as before; - `shouldAcceptTerminalEventsAfterAResetUntilRedeployment`: after a reset the old id is forgotten and events are accepted until the next deployment registers its id. `StateTransitionCleanupTest` (17 tests, the other main consumer of `updateStateByExecutionService`) passes unchanged. Verified with: ``` ./mvnw -pl seatunnel-engine/seatunnel-engine-server test -Dtest='PhysicalVertexTest,StateTransitionCleanupTest' ``` I verified the fix locally. -- 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]
