Skip to content

[FLINK-38974][runtime] Handle jobs in running applications during HA recovery#27686

Open
eemario wants to merge 2 commits intoapache:masterfrom
eemario:FLIP560-2
Open

[FLINK-38974][runtime] Handle jobs in running applications during HA recovery#27686
eemario wants to merge 2 commits intoapache:masterfrom
eemario:FLIP560-2

Conversation

@eemario
Copy link
Contributor

@eemario eemario commented Feb 26, 2026

What is the purpose of the change

This PR is part of the application high-availability (HA) improvements, focusing on job recovery behavior during JobManager failover for running applications.

Brief change log

  • For running jobs that are recovered after a JM failover, execution is deferred until an explicit application recovery signal is received. If no such signal arrives before the application reaches a terminal state (e.g., finished, failed, or cancelled), the job is marked as failed, basic metadata is preserved for visibility, and proper cleanup is performed.
  • For already-terminated jobs, the cleanup of job results (i.e., marking them as "clean") is delayed until after the application itself terminates. If the application later recovers and restarts, any "dirty" job results from the previous run are cleaned up during the recovery process.

Verifying this change

This change added tests and can be verified as follows:

  • Added tests that validate the job submission behavior of the PackagedProgramApplication
  • Added tests that validate the HA recovery behavior of the Dispatcher
  • Manually verified the change by running a standalone cluster with zookeeper, confirming the job recovery during JM failover

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)

@flinkbot
Copy link
Collaborator

flinkbot commented Feb 26, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@eemario eemario marked this pull request as ready for review February 27, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants