NicoK commented on a change in pull request #5381: [FLINK-8523][network] Stop 
assigning floating buffers for blocked input channels in exactly-once mode
URL: https://github.com/apache/flink/pull/5381#discussion_r205577375
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -485,6 +494,23 @@ public void requestPartitions() throws IOException, 
InterruptedException {
                }
        }
 
+       @Override
+       public void blockInputChannel(int channelIndex) {
+               InputChannel inputChannel = 
indexToInputChannelMap.get(channelIndex);
+               if (inputChannel == null) {
+                       throw new IllegalStateException("Could not find input 
channel from the channel index " + channelIndex);
+               }
+
+               inputChannel.setBlocked(true);
+       }
+
+       @Override
+       public void releaseBlockedInputChannels() {
+               for (InputChannel inputChannel : inputChannels.values()) {
+                       inputChannel.setBlocked(false);
+               }
 
 Review comment:
   ~Do we need to make sure that there's no concurrent `blockInputChannel` call 
trying to block a channel for an alignment for a later checkpoint or can we 
assume here that we are still processing one alignment (doing the release) and 
therefore cannot concurrently block?~
   I guess we are safe here - `BarrierBuffer` actually does it the same way.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to