[BP-2.3][FLINK-39964][state] Fix unrestorable checkpoint after CLAIM restore from native savepoint - #28839
Open
Savonitar wants to merge 2 commits into
Open
[BP-2.3][FLINK-39964][state] Fix unrestorable checkpoint after CLAIM restore from native savepoint#28839Savonitar wants to merge 2 commits into
Savonitar wants to merge 2 commits into
Conversation
…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)
Collaborator
snuyanzin
requested changes
Jul 30, 2026
snuyanzin
left a comment
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #28709
Was generative AI tooling used to co-author this PR?
Claude Fable 5