wsry commented on a change in pull request #18173:
URL: https://github.com/apache/flink/pull/18173#discussion_r776354460
##########
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:
Because the exclusive buffers used by remote channels are not allocated
from LocalBufferPool. They are allocated directly from NetworkBufferPool using
the requestMemorySegments (I) method. The LocalBufferPool allocates buffers
lazily, so it accounts those buffers as "required" when initializing and then
allocates on-demand. Instead, the exclusive buffers used by remote channels are
allocated and accounted as "required" at the same time on remote channel setup.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]