You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/09 08:35:56 UTC

[GitHub] [flink] reswqa commented on a diff in pull request #20924: [FLINK-29298] LocalBufferPool request buffer from NetworkBufferPool hanging.

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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java:
##########
@@ -652,13 +674,15 @@ public void setNumBuffers(int numBuffers) {
                 // one buffer from NetworkBufferPool
                 return;
             }
-
-            if (checkAvailability()) {
+            AvailabilityStatus availabilityAndRequestFromGlobalPool = checkAvailability();
+            if (availabilityAndRequestFromGlobalPool.isAvailable()) {
                 toNotify = availabilityHelper.getUnavailableToResetAvailable();
             } else {
                 availabilityHelper.resetUnavailable();
             }
-
+            if (availabilityAndRequestFromGlobalPool.isNeedRequestFromGlobalWhenAvailable()) {
+                requestMemorySegmentFromGlobalWhenAvailable();
+            }
             checkConsistentAvailability();

Review Comment:
   good suggestion.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org