kaustubhbutte17 opened a new pull request, #28519: URL: https://github.com/apache/flink/pull/28519
## What is the purpose of the change When a Flink job fails and restarts, it transitions through `Restarting → WaitingForResources`. During this state, the `previousExecutionGraph` (which contains checkpoint statistics from the prior execution) is available, but the REST API/Web UI cannot access these stats because `StateWithoutExecutionGraph.getJob()` creates a sparse `ArchivedExecutionGraph` with empty checkpoint data. This PR fixes that by: 1. Adding `withCheckpointStatsSnapshot()` to `ArchivedExecutionGraph` — creates a copy with different checkpoint stats 2. Overriding `getJob()` in `WaitingForResources` — attaches checkpoint stats from the `previousExecutionGraph` when available ## Brief change log - Added `ArchivedExecutionGraph.withCheckpointStatsSnapshot()` method - Overrode `WaitingForResources.getJob()` to preserve checkpoint stats from the previous execution graph - Added 2 unit tests in `WaitingForResourcesTest` ## Verifying this change This change is verified by new unit tests: - `testGetJobIncludesCheckpointStatsFromPreviousExecutionGraph` — verifies checkpoint stats from a mock previous execution graph are preserved - `testGetJobWithoutPreviousExecutionGraphReturnsNullCheckpointStats` — verifies the default behavior when no previous execution graph exists ## 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: no - The (broadcasting) coordination functionality: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
