SEPURI-SAI-KRISHNA commented on PR #13383:
URL: https://github.com/apache/seatunnel/pull/13383#issuecomment-7064221086
Thanks, Issue 1 is right. Before this PR a failed history write left the job
master hanging, so the job stayed queryable as a live job. With the PR, the
master leaves `runningJobMasterMap`, `finishedJobStateImap` has no entry, and
`getJobDetailState` returns null.
Fixed in 7f32cd5d3b with your option B:
- `cleanJob()` schedules `scheduleRemoveJobStateMaps` only when both
`storeJobInfo` and `storeFinishedJobState` succeeded. Otherwise it logs a
warning and keeps the state maps, the timestamps and the `runningJobInfo` entry.
- That is the state `restoreJobFromMasterActiveSwitch` already handles: an
ended job with no `JobCleanupRecord` goes to `cleanupTerminalZombieJob`. That
path stores the DAG info and the finished state from the kept maps first, and
only then removes them.
`CoordinatorServiceJobCleanupTest#testTerminalZombieJobWithoutCleanupRecordPersistsHistoryAndRemovesState`
covers it. Until then the REST job info still returns the job from
`runningJobInfo`, with status `UNKNOWABLE`.
- `runCleanupStep` now returns whether the step succeeded. It has a comment
on its exception policy (RuntimeException logged, Error not caught) and on the
history-before-removal order (Issue 2).
Test: `JobMasterTest#testJobCompletesWhenACleanupStepFails` raises the
cleanup delay so a scheduled record stays visible. It asserts the record exists
when the checkpoint step fails. When either history step fails, it asserts that
no record exists and the job keeps `CANCELED` in the state map. On the previous
head, the two history cases fail ("expected: <false> but was: <true>"). With
the fix, all three pass, and so do `JobMasterTest` and
`CoordinatorServiceJobCleanupTest` in full (24 tests, 0 failures).
A retry of the history write on the same master (your option A) would need a
durable pending-history record. I kept that out of this PR to keep it focused,
and can open it separately if you think it is needed.
--
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]