Skip to content

[FLINK-36973][config] Skip options not explicitly set when converting SavepointRestoreSettings to Configuration#28295

Open
AlexYinHan wants to merge 1 commit into
apache:masterfrom
AlexYinHan:yh/dev_39673
Open

[FLINK-36973][config] Skip options not explicitly set when converting SavepointRestoreSettings to Configuration#28295
AlexYinHan wants to merge 1 commit into
apache:masterfrom
AlexYinHan:yh/dev_39673

Conversation

@AlexYinHan
Copy link
Copy Markdown
Contributor

What is the purpose of the change

This PR fixes the issue in FLINK-39673. It skips writing RESTORE_MODE and SAVEPOINT_IGNORE_UNCLAIMED_STATE from SavepointRestoreSettings into Configuration when they were not explicitly provided. If the user uses deprecated configuration keys for these options, this prevents the configurations from being overridden by default values.

Brief change log

  • In SavepointRestoreSettings, change the allowNonRestoredState and recoveryClaimMode from NonNull to Nullable, to tell whether they are explicitly provided.
  • Modify SavepointRestoreSettings.toConfiguration() to skip writing RESTORE_MODE and
    SAVEPOINT_IGNORE_UNCLAIMED_STATE when they were not explicitly provided by the user.

Verifying this change

This change added tests and can be verified as follows:

  • SavepointRestoreSettingsTest.java Added test that validates that default/null values of SavepointRestoreSettings are correctly handled

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? (no)

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

Generated-by: [Claude-4.6-Opus]

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Jun 2, 2026

CI report:

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

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