Skip to content

[BP-2.3][FLINK-39964][state] Fix unrestorable checkpoint after CLAIM restore from native savepoint - #28839

Open
Savonitar wants to merge 2 commits into
apache:release-2.3from
Savonitar:FLINK-39964-release-2.3
Open

[BP-2.3][FLINK-39964][state] Fix unrestorable checkpoint after CLAIM restore from native savepoint#28839
Savonitar wants to merge 2 commits into
apache:release-2.3from
Savonitar:FLINK-39964-release-2.3

Conversation

@Savonitar

@Savonitar Savonitar commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Backport of #28709

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

Savonitar and others added 2 commits July 29, 2026 13:39
…ry twice

testSavepointDeepCopy listed savepointPath1 for both stateFiles1 and
stateFiles2, so the copied-files assertion compared savepoint1's
directory with itself and savepoint2's directory was never examined at
all. Point stateFiles2 at savepointPath2, as the variable name, the
assertion messages, and the test's documented steps always intended.

The mix-up was introduced when the getFileNamesInDirectory helper was
extracted (f125067); before that, both checks listed savepointPath2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 1a2f458)
…from native savepoint

The first incremental checkpoint after a CLAIM-mode restore from a native
savepoint reuses the savepoint's SST files as RelativeFileStateHandles. The
metadata serializer stored only their relative path, so on restore they were
resolved against the new checkpoint's exclusive directory and could no longer
be found.

The serializer now knows the exclusive directory of the checkpoint being
written (CheckpointMetadataOutputStream#getExclusiveCheckpointDir, passed down
as a non-null SerializationContext) and keeps the compact relative encoding
only for handles whose file actually lives in that directory; a foreign handle
(a reused savepoint SST) is persisted with its absolute path using the
pre-existing FileStateHandle encoding. The wire format and the metadata version
are unchanged. The state processor API keeps the unconditional relative
encoding via the explicit Checkpoints#storeCheckpointMetadataWithoutExclusiveDir,
because its deep copy places every referenced file next to the new metadata.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 07bcbd9)
@flinkbot

flinkbot commented Jul 29, 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

@snuyanzin snuyanzin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution

since you use AI, can you use Generated-by: instead of Co-authored-by: as mentioned in Apache recommendations https://www.apache.org/legal/generative-tooling.html

also the doc about this is in https://github.com/apache/flink/pull/27776/changes#r2979585031

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants