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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java:
##########
@@ -766,13 +776,12 @@ private void returnExcessMemorySegments() {
 
     @GuardedBy("availableMemorySegments")
     private boolean hasExcessBuffers() {
-        return numberOfRequestedOverdraftMemorySegments > 0
-                || numberOfRequestedMemorySegments > currentPoolSize;
+        return numberOfRequestedOverdraftMemorySegments > 0;

Review Comment:
   > we can make this change as soon as we get rid of 
numberOfRequestedOverdraftMemorySegments(if we will do it at all).
   
   Yes, I'm sure we'll be removing `numberOfRequestedOverdraftMemorySegments` 
soon as keeping it would complicate the contract a bit.
   
   I agree that it's easy to introduce some hard-to-find bugs, especially since 
we'll be refactoring it soon. I will revert the change here.



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