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_r205575797
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -133,8 +134,13 @@
         * Input channels. There is a one input channel for each consumed 
intermediate result partition.
         * We store this in a map for runtime updates of single channels.
         */
+       @GuardedBy("requestLock")
        private final Map<IntermediateResultPartitionID, InputChannel> 
inputChannels;
 
+       /** A mapping from internal channel index in this gate to input 
channel. */
+       @GuardedBy("requestLock")
+       private final Map<Integer, InputChannel> indexToInputChannelMap;
 
 Review comment:
   Actually, this could be a simple array, couldn't it? If you look at 
`org.apache.flink.runtime.io.network.partition.consumer.SingleInputGate#create` 
you'll see that `0 <= channelIndex < inputChannels.length`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to