1996fanrui opened a new pull request, #28660: URL: https://github.com/apache/flink/pull/28660
This PR depends on https://github.com/apache/flink/pull/28651, https://github.com/apache/flink/pull/28652 and https://github.com/apache/flink/pull/28659 Please only review the last 4 commits (prefixed [FLINK-39523]). ## What is the purpose of the change [FLINK-39523] Checkpoint coordination during recovery (memory-based trigger). It's part 4 of FLINK-38544 (checkpointing during recovery of unaligned checkpoint state). This PR makes checkpoints work while recovered state is still being consumed: a new `RecoveryCheckpointTrigger` is dispatched by the barrier handlers at checkpoint start and inserts a `RecoveryCheckpointBarrier` into every channel still in recovery, so `checkpointStarted` persists exactly the pre-barrier recovered data. The in-memory implementation only inserts barriers — the one-shot in-memory push leaves no undrained residue, so there is no snapshot to transfer. StreamTask manages the trigger lifecycle: NOT_READY while filtering (checkpoints declined as task-not-ready) → the barrier-inserting trigger during consumption → NO_OP once all gates report state consumed. Finally, `execution.checkpointing.during-recovery.enabled` returns to ITCase randomization, so the randomized ITCase fleet exercises the feature in ~50% of runs. ## Brief change log - [FLINK-39523][checkpoint] RecoveryCheckpointTrigger with NOT_READY/NO_OP and a barrier-inserting in-memory implementation - [FLINK-39523][checkpoint] ChannelState: dispatch checkpoint start through the recovery trigger - [FLINK-39523] Thread the trigger through barrier-handler construction and the StreamTask lifecycle - [FLINK-39523][test] Restore during-recovery flag randomization; re-enable filtering ITCase ## Verifying this change - New unit tests: InMemoryRecoveryCheckpointTriggerTest, ChannelStateDispatcherTest, AlternatingCollectingBarriersDispatchHookTest, AlternatingWaitingForFirstBarrierUnalignedDispatchHookTest, StreamTask trigger-lifecycle tests - Re-enabled RecoveredStateFilteringLargeRecordITCase (explicitly flag-on) passes; the randomized ITCase fleet now runs the flag in ~50% of runs ## 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: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no -- 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]
