zhijiangW commented on a change in pull request #13523:
URL: https://github.com/apache/flink/pull/13523#discussion_r514180270



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
##########
@@ -238,6 +248,12 @@ public void setup() throws IOException {
                checkState(this.bufferPool == null, "Bug in input gate setup 
logic: Already registered buffer pool.");
                setupChannels();
 
+               //TODO we can further judge the condition whether the type is 
file-based or mmap-based
+               if (consumedPartitionType.isBlocking()) {

Review comment:
       I thought of another issue to use `Supplier<MemorySegment>` way, that 
means for every call of `LocalInputChannel#getNextBuffer` we need to allocate a 
new segment for it (no matter with pooled or unpooled segment). My previous way 
tried to allocate only one segment for always reuse in all the 
``LocalInputChannel#getNextBuffer` calls.
   
   But I am fine with the proposal of using unpooled segment here, because it 
indeed simplify some aspects as you mentioned above.




----------------------------------------------------------------
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]


Reply via email to