pnowojski commented on a change in pull request #18173: URL: https://github.com/apache/flink/pull/18173#discussion_r776313647
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java ########## @@ -158,7 +159,8 @@ public MemorySegment requestMemorySegment() { public List<MemorySegment> requestMemorySegmentsBlocking(int numberOfSegmentsToRequest) throws IOException { - return internalRequestMemorySegments(numberOfSegmentsToRequest); + return internalRequestMemorySegments( + numberOfSegmentsToRequest, this::internalRecycleMemorySegments); Review comment: So the most important difference between `requestMemorySegments` (I) vs `requestMemorySegment` (II) and `requestMemorySegmentsBlocking` (III), is that buffers request by (II) or (III) are already accounted as "required" during the creation of the `LocalBufferPool`? While (I) are not previously accounted anywhere? Why is it that way? Why can not we always calculate the required buffers upon `LocalBufferPool` creation? -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org