dawidwys commented on a change in pull request #15897:
URL: https://github.com/apache/flink/pull/15897#discussion_r635246250
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/checkpointing/AlternatingCheckpointsTest.java
##########
@@ -507,13 +477,20 @@ public void
testAllChannelsUnblockedAfterAlignmentTimeout() throws Exception {
// we set timer on announcement and test channels do not produce
announcements by themselves
send(EventSerializer.toBuffer(new EventAnnouncement(checkpointBarrier,
0), true), 0, gate);
- send(checkpointBarrierBuffer, 0, gate);
// emulate blocking channels on aligned barriers
((TestInputChannel) gate.getChannel(0)).setBlocked(true);
Review comment:
Yes, it is. I agree it is a bit confusing. The network stack actually
blocks the regular channels. Therefore the calls in `BarrierHandlerState` are
necessary only for bookkeeping to unblock them in the end. This emulates the
network stack behaviour.
See
```
public abstract class IndexedInputGate extends InputGate implements
CheckpointableInput {
....
@Override
public void blockConsumption(InputChannelInfo channelInfo) {
// Unused. Network stack is blocking consumption automatically by
revoking credits.
}
...
}
```
--
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]