SEPURI-SAI-KRISHNA commented on PR #13339:
URL: https://github.com/apache/seatunnel/pull/13339#issuecomment-7073176202
Thanks for the fix. I read the head `f2a5a8566b` against base `f1ab36f042`
and ran the PR's tests locally. Three points that are separate from the monitor
race already raised:
1. **A ghost event is still applied after `reset()`, without any race.**
`resetExecutionState()` sets `currentExecutionId = null`, and the guard only
drops an event when both ids are non-null. In `SubPlan`, `reset()` (line 621)
comes before `applyResourceForPipeline` (line 811), which stores the new
attempt's slots with `setOwnedSlotProfiles`, and the new id is only set later
by `getTaskGroupImmutableInformation()` at deploy. A terminal report of the
reset attempt that lands in that window, including any wait for resources, is
applied: the vertex goes CREATED -> FAILED and
`JobMaster.updateTaskExecutionState` releases the slot just applied for. That
is the #13317 harm. A probe next to
`shouldAcceptTerminalEventsAfterAResetUntilRedeployment` confirms it: after
`getTaskGroupImmutableInformation()` and `reset()`, a FAILED event carrying the
previous id returns `applied = true`. Running the check under the vertex
monitor would not change this: the comparison passes.
A possible rule: after `reset()`, drop events with a non-null id until a
deployment registers its id, and keep accepting events while a vertex has never
tracked an id (a new master). It cannot drop a report that should be adopted:
`taskDone` calls `finishExecution` before `future.complete`, so a report with
id X is only sent after X has left `executionContexts`, and a later
`deployTask` cannot keep X.
2. **One terminal report still has no id.** When `deployLocalTask` completes
`resultFuture` exceptionally, the callback builds `new
TaskExecutionState(location, FAILED, s)` (TaskExecutionService.java:665),
retried like the others. `executionId` is a parameter of `deployLocalTask`, so
it can be tagged too.
3. **Possible NPE in the skip path.** `finishExecution` removes the context
with `executionContexts.compute` without holding the `TaskExecutionService`
monitor, so the context can go between `containsKey` and the new
`executionContexts.get(...).getExecutionId()`. Reading it once and deploying
normally when it is null avoids that.
JDK 17 on the head: the 10 tests of `PhysicalVertexTest`,
`StateTransitionCleanupTest` (17), `TaskExecutionServiceTest` (20) and
`JobMasterTest` (10) pass, and `spotless:check` is clean. The only failure was
the probe above.
--
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]