pnowojski commented on a change in pull request #11687:
URL: https://github.com/apache/flink/pull/11687#discussion_r419941457



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java
##########
@@ -87,10 +90,14 @@ public LocalInputChannel(
                int maxBackoff,
                InputChannelMetrics metrics) {
 
-               super(inputGate, channelIndex, partitionId, initialBackoff, 
maxBackoff, metrics.getNumBytesInLocalCounter(), 
metrics.getNumBuffersInLocalCounter());
+               super(inputGate, channelIndex, partitionId, initialBackoff, 
maxBackoff, metrics);
 
                this.partitionManager = checkNotNull(partitionManager);
                this.taskEventPublisher = checkNotNull(taskEventPublisher);
+               // In most cases we only need one buffer for reading recovered 
state except for very large record.
+               // Then only one floating buffer is required. Even though we 
need more buffers for recovery for
+               // large record, it only increases some interactions with pool.
+               this.bufferManager = new BufferManager(this, 1);

Review comment:
       What do you mean by:
   > Actually any value for numRequiredBuffers can work correctly now and the 
only cost is increasing some unnecessary interactions between BufferManager and 
LocalBufferPool.
   
   ? That with `numRequiredBuffers = 0`, the only difference would be that 
there are not floating buffers initially assigned and they need to be ramped up 
as the backlog increases?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to