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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java:
##########
@@ -503,12 +508,11 @@ private void onGlobalPoolAvailable() {
         mayNotifyAvailable(toNotify);
     }
 
+    @GuardedBy("availableMemorySegments")
     private boolean shouldBeAvailable() {
         assert Thread.holdsLock(availableMemorySegments);
 
-        return !availableMemorySegments.isEmpty()
-                && unavailableSubpartitionsCount == 0
-                && numberOfRequestedOverdraftMemorySegments == 0;
+        return !availableMemorySegments.isEmpty() && 
unavailableSubpartitionsCount == 0;

Review Comment:
   FYI, I agree that remove this condition from `shouldBeAvailable` does not 
affect the fix of this bug. In order not to block this ticket, I added this 
condition back.  I am also willing to help improve or refactor it, looking 
forward to a clearer and easier to understand `LocalBufferPool`. 



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