Skip to content

[FLINK-40695] Add a retry state for failed ExecutionGraph creation - #29290

Open
vahmed-hamdy wants to merge 7 commits into
apache:masterfrom
vahmed-hamdy:oss-egc-retry
Open

vahmed-hamdy wants to merge 7 commits into
apache:masterfrom
vahmed-hamdy:oss-egc-retry

Conversation

@vahmed-hamdy

Copy link
Copy Markdown
Contributor

What is the purpose of the change

  • Adding retry logic to ExecutionGraph creation on the AdaptiveScheduler

Brief change log

(for example:)

  • Added new RetryExecutionGraphCreation AdaptiveScheduler state
  • Added proper RetryBackOffStrategy for the new state
  • Documentaion
  • Tests

Verifying this change

This change added tests and can be verified as follows:

  • Added UnitTests for the new transition

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: yes
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? docs

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Opus 4.8

@flinkbot

flinkbot commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

CI report:

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

…rengthen tests

The retry strategy loader copied the prefixed configuration via
Configuration#addAll(new DelegatingConfiguration(...)). Configuration#addAll
reads the other config's inherited confData directly, but a
DelegatingConfiguration keeps its data in the backing configuration and leaves
confData empty, so the copy came out empty and every prefixed key was silently
dropped. As a result the feature could never be enabled through configuration
(the loader always fell back to no-restart). Read the prefixed configuration
directly through the DelegatingConfiguration instead.

Add ExecutionGraphCreationRetryStrategyFactoryLoaderTest covering per-type
parsing, job-over-cluster precedence, prefixed per-type parameters, default
no-restart, independence from the job's own restart-strategy, and unknown
strategy handling (this pins the bug above).

Move the AdaptiveScheduler EG-creation retry integration tests into a dedicated
AdaptiveSchedulerExecutionGraphCreationRetryTest, which keeps AdaptiveSchedulerTest
under the checkstyle file-length limit, and assert the
numExecutionGraphCreationRetries metric on a successful retry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Sep 25, 2026
vahmed-hamdy and others added 2 commits September 28, 2026 09:32
…tions

The new jobmanager.adaptive-scheduler.retry-execution-graph-creation.restart-strategy.type
option in JobManagerOptions references RestartStrategyOptions, so loading
JobManagerOptions now transitively runs RestartStrategyType.<clinit>. That
initializer built its alias sets with org.apache.commons.compress.utils.Sets,
which is absent from slim classpaths such as the flink-table-jdbc driver bundle,
producing a NoClassDefFoundError (org/apache/commons/compress/utils/Sets) when
the JDBC driver initializes RestOptions -> JobManagerOptions.

Replace the commons-compress Sets usage with plain JDK collections. Behavior is
unchanged (allAvailableValues is still the main value plus its aliases), and the
enum no longer pulls commons-compress onto the runtime classpath.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants