SEPURI-SAI-KRISHNA commented on issue #13554: URL: https://github.com/apache/seatunnel/issues/13554#issuecomment-7250788224
@DanielLeens thanks. The contract and test outline, against dev `0bef81d003`: **1. Expected id.** The record is the executionId #13339 adds to the master's `PhysicalVertex`, so there is one attempt token. It is set when `getTaskGroupImmutableInformation` generates the id, before `DeployTaskOperation` is sent. After a master failover it comes from the worker's skip-redeploy answer (#13339's `existingExecutionId`). `CheckpointCoordinator` has no vertex reference today, so it gets a read-only lookup per `TaskGroupLocation`, and sends none of the five while a vertex has no id. Each operation carries the id. The worker captures its `TaskGroupContext` once and compares ids before `getTask`, restore, start, checkpoint complete, checkpoint end or the barrier. **2. Mismatch and missing context.** - Mismatch: no side effect, a WARN with location and both ids, and a non-retryable stale result. The master ignores it for an ended attempt, and fails the pipeline if the vertex still has that id. - Missing context: the worker fails at once and the master re-sends, keeping 30 x 2 s, only while the vertex's current id still equals the operation's, and fails it once that stops being true. A context with another id then counts as a mismatch. This replaces the worker-side retries, which removes the `NotifyTaskStartOperation` precedence bug and the dead `CheckpointFinishedOperation`/`CheckpointEndOperation` retry. **3. Compatibility.** Each operation adds a `long` after `taskLocation` in `writeInternal`/`readInternal`. The format has no version, so old and new nodes cannot exchange these operations: master and workers must be upgraded together, as `incompatible-changes.md` will say. An operation without a valid id is rejected, never treated as a match. No checkpoint or IMap format changes. **4. Tests** (`TaskExecutionServiceTest`, `CheckpointCoordinatorTest`), with recording tasks: - For each of the five: deploy A at a location, cancel it, deploy B there, send with A's id. B sees no barrier, start, restore, complete or end, and the result is stale. - Missing context: B's id before B is deployed applies once; A's id while the location is empty never reaches B, and the master fails it once its id moves on. - Failover: a new master adopts B's id; A's is rejected and B's applied. - Cases B and D from the issue table, and an operation without an id rejected. I would base the PR on #13339 once it merges. Does this match what you had in mind? -- 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]
