pnowojski commented on a change in pull request #18173:
URL: https://github.com/apache/flink/pull/18173#discussion_r776379446
##########
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:
But why is done like so? Why can not we request exclusive buffers via
`LocalBufferPool`? I see that it has been done like that since 2017, when
credit based flow control was introduced.
I mean this is an independent issue from FLINK-25407, but as I see it we
could:
1. either somehow rename those methods. But I have a feeling that every
potential name will be confusing, until we find an answer to the above
question, and embed this answer into the code (method name or a comment).
2. or we could maybe simplify contract of those methods/classes, and unify
the way how exclusive buffers are allocated in the first place?
edit:
> But why is done like so? Why can not we request exclusive buffers via
`LocalBufferPool`?
Is it because all of the buffers in the `LocalBufferPool` are floating
buffers? And that's the basis of the implementation of the whole
exclusive/floating buffer concept?
--
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]