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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/BufferManager.java
##########
@@ -125,9 +125,9 @@ private boolean shouldContinueRequest(BufferPool 
bufferPool) {
        }
 
        /**
-        * Requests exclusive buffers from the provider and returns the number 
of requested amount.
+        * Requests exclusive buffers from the provider.
         */
-       int requestExclusiveBuffers() throws IOException {
+       void requestExclusiveBuffers() throws IOException {
                Collection<MemorySegment> segments = 
globalPool.requestMemorySegments();

Review comment:
       The previous initial credit seems to be got from the returned collection 
size of `globalPool.requestMemorySegments()` somehow. If we can get the initial 
credit in advance, then it would be better to also pass it as argument into 
`requestMemorySegments` to get required size. To do so, the 
`NetworkBufferPool#requestMemorySegments` seems more general to decouple with 
credit semantic.




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