[FLINK-36317][runtime] Populate ArchivedExecutionGraph with CheckpointStatsSnapshot in WaitingForResources state#28519
Open
kaustubhbutte17 wants to merge 2 commits into
Conversation
…pshot in WaitingForResources state When a job restarts and enters WaitingForResources with a previousExecutionGraph, the checkpoint statistics from the previous execution are now preserved in the ArchivedExecutionGraph returned by getJob(). Previously, these stats were lost because StateWithoutExecutionGraph.getJob() creates a sparse archived graph with empty checkpoint stats. This change: - Adds withCheckpointStatsSnapshot() to ArchivedExecutionGraph for creating a copy with different checkpoint stats - Overrides getJob() in WaitingForResources to attach checkpoint stats from the previousExecutionGraph when available - Adds tests verifying checkpoint stats preservation Signed-off-by: Kaustubh Butte <kaustubhbutte17@gmail.com>
Collaborator
Contributor
|
Hi @kaustubhbutte17 |
…Test Signed-off-by: Kaustubh Butte <kaustubhbutte17@gmail.com>
Author
|
Thanks @spuru9 for the review! Fixed both issues:
Pushed the fix in the latest commit. |
Author
|
@flinkbot run azure |
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.
What is the purpose of the change
When a Flink job fails and restarts, it transitions through
Restarting → WaitingForResources. During this state, thepreviousExecutionGraph(which contains checkpoint statistics from the prior execution) is available, but the REST API/Web UI cannot access these stats becauseStateWithoutExecutionGraph.getJob()creates a sparseArchivedExecutionGraphwith empty checkpoint data.This PR fixes that by:
withCheckpointStatsSnapshot()toArchivedExecutionGraph— creates a copy with different checkpoint statsgetJob()inWaitingForResources— attaches checkpoint stats from thepreviousExecutionGraphwhen availableBrief change log
ArchivedExecutionGraph.withCheckpointStatsSnapshot()methodWaitingForResources.getJob()to preserve checkpoint stats from the previous execution graphWaitingForResourcesTestVerifying this change
This change is verified by new unit tests:
testGetJobIncludesCheckpointStatsFromPreviousExecutionGraph— verifies checkpoint stats from a mock previous execution graph are preservedtestGetJobWithoutPreviousExecutionGraphReturnsNullCheckpointStats— verifies the default behavior when no previous execution graph existsDoes this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation