zhijiangW commented on a change in pull request #11351: [FLINK-16404][runtime]
Solve the potential deadlock problem when reducing exclusive buffers to zero
URL: https://github.com/apache/flink/pull/11351#discussion_r397610517
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputChannel.java
##########
@@ -56,6 +57,10 @@
protected final SingleInputGate inputGate;
+ protected long currentCheckpointId = -1;
+
+ protected ChannelState channelState = ChannelState.CONSUMING;
Review comment:
I considered discarding these two states in `InputChannel` level to unify
reuse the states inside `CheckpointBarrierAligner`.
Regarding the `RemoteInputChannel` case, these two states are used for
avoiding unnecessary notification for upstream side if the unblock is triggered
by other channels.
One possible option is to pass the boolean array of blocked channels` from
`CheckpointBarrierAligner` while calling `notifyCheckpointCompletedOrCanceled`.
In `CheckpointedInputGate` and `UnionInputGate` level, they can also pass the
maintained `offsetIndex` to dedicated `SingleInputGate`, then the single gate
can judge whether the respective `RemoteInputChannel` is actually blocked or
not to notify the upstream side if necessary.
Regarding the `LocalInputChannel` case, we can consider it separately.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services