reswqa commented on code in PR #22381:
URL: https://github.com/apache/flink/pull/22381#discussion_r1164941748


##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java:
##########
@@ -49,7 +49,11 @@
  *
  * <p>The size of this pool can be dynamically changed at runtime ({@link 
#setNumBuffers(int)}. It
  * will then lazily return the required number of buffers to the {@link 
NetworkBufferPool} to match
- * its new size.
+ * its new size. New buffers can be requested only when {@code 
numberOfRequestedMemorySegments +
+ * numberOfRequestedOverdraftMemorySegments < currentPoolSize + 
maxOverdraftBuffersPerGate}. In

Review Comment:
   Yes, good catch! I was stupid when typing the commit message. 🤣 
   
   In fact, maybe we can never guarantee that `the total number of requested 
buffers(requested + overdraft) does not exceed poolSize + 
maxOverdraftBuffersPerGate`, because we will not force buffers to return when 
the pool size changes, right?



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

Reply via email to