Efrat19 opened a new pull request, #30127:
URL: https://github.com/apache/flink/pull/30127
## What is the purpose of the change
I got a dispatcher failure on startup, reproducing in the following
scenario:
1. A job is submitted to an HA session cluster and classified as a
SingleJobApplication
2. The job enters a terminal state for any reason
3. The dispatcher creates a dirty JobResultStore entry for it
4. Leadership change before the dispatcher could proceed to create the
ApplicationResultStore entry
5. On the new dispatcher startup, it sees a dirty jobResultStore entry not
mapped to an applicationResult, and crashes on
checkState(recoveredDirtyJobResultsByApplicationId.isEmpty())
## Brief change log
- Tolerate the case on dispatcher startup by creating a SingleJobApplication
out of the orphaned jobResult (same as we do during a single job submission)
## Verifying this change
This change added tests and can be verified as follows:
- Unit test `testJobCleanupWithoutRecoveredJobGraphAndApplicationResult`
- ITCase `testCleanupAfterLeadershipChangeBeforeApplicationResultWasWritten`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Fable 5.1
--
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]