[FLINK-39018][checkpoint] Support checkpoint for LocalInputChannel#27861
Merged
1996fanrui merged 5 commits intoapache:masterfrom Apr 7, 2026
Merged
Conversation
Collaborator
cf606db to
4fa25ef
Compare
…de toBeConsumedBuffers
…ot for recovered buffers
4fa25ef to
b1a7ca7
Compare
pnowojski
reviewed
Apr 1, 2026
.../src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java
Outdated
Show resolved
Hide resolved
...ntime/src/main/java/org/apache/flink/runtime/io/network/partition/PipelinedSubpartition.java
Outdated
Show resolved
Hide resolved
...ava/org/apache/flink/runtime/io/network/partition/PipelinedSubpartitionWithReadViewTest.java
Show resolved
Hide resolved
1996fanrui
commented
Apr 1, 2026
Comment on lines
+255
to
+269
| // Priority events (e.g. unaligned checkpoint barriers) must notify downstream even | ||
| // when the subpartition is blocked. | ||
| // | ||
| // During recovery, once the upstream output channel state is fully restored, a | ||
| // RECOVERY_COMPLETION event (EndOfOutputChannelStateEvent) is emitted. This event | ||
| // blocks the subpartition to prevent the upstream from sending new data while the | ||
| // downstream is still consuming recovered buffers. The subpartition remains blocked | ||
| // until the downstream finishes consuming all recovered buffers from every channel | ||
| // and calls resumeConsumption() to unblock. | ||
| // | ||
| // If a checkpoint is triggered while the downstream is still consuming recovered | ||
| // buffers, the upstream receives an unaligned checkpoint barrier and adds it to this | ||
| // blocked subpartition. The barrier must still be delivered to the downstream | ||
| // immediately, otherwise the checkpoint will hang until it times out. | ||
| return buffers.getNumPriorityElements() == 1; |
Member
Author
There was a problem hiding this comment.
Explaining why Priority events (e.g. unaligned checkpoint barriers) must notify downstream even when the subpartition is blocked.
pnowojski
reviewed
Apr 2, 2026
...test/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannelTest.java
Show resolved
Hide resolved
...me/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java
Show resolved
Hide resolved
…r availability for recovered buffers
…n if it is blocked to ensure the checkpoint barrier can be handled by downstream task Priority events (e.g. unaligned checkpoint barriers) must notify downstream even when the subpartition is blocked. During recovery, once the upstream output channel state is fully restored, a RECOVERY_COMPLETION event (EndOfOutputChannelStateEvent) is emitted. This event blocks the subpartition to prevent the upstream from sending new data while the downstream is still consuming recovered buffers. The subpartition remains blocked until the downstream finishes consuming all recovered buffers from every channel and calls resumeConsumption() to unblock. If a checkpoint is triggered while the downstream is still consuming recovered buffers, the upstream receives an unaligned checkpoint barrier and adds it to this blocked subpartition. The barrier must still be delivered to the downstream immediately, otherwise the checkpoint will hang until it times out.
fef5732 to
f08a818
Compare
1996fanrui
commented
Apr 2, 2026
Member
Author
There was a problem hiding this comment.
Thanks @pnowojski for the review, all comments are addressed, and commits are organized.
… physical channels
f08a818 to
bb071b2
Compare
pnowojski
reviewed
Apr 3, 2026
.../src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java
Show resolved
Hide resolved
...me/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
Show resolved
Hide resolved
pnowojski
approved these changes
Apr 7, 2026
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.
This PR depends on #27782 and #27783
What is the purpose of the change
[FLINK-39018][checkpoint] Support checkpoint for LocalInputChannel
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation