wsry commented on a change in pull request #18173: URL: https://github.com/apache/flink/pull/18173#discussion_r776689490
########## 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: I think your proposal is good enough. I will update the PR soon. -- 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