flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] zhijiangW commented on a change in pull request #9993: [FLINK-14498][runtime]Introduce NetworkBufferPool#isAvailable() for interacting with LocalBufferPool.
Date Fri, 01 Nov 2019 03:05:26 GMT
zhijiangW commented on a change in pull request #9993: [FLINK-14498][runtime]Introduce NetworkBufferPool#isAvailable()
for interacting with LocalBufferPool.
URL: https://github.com/apache/flink/pull/9993#discussion_r341437591
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java
 ##########
 @@ -355,6 +359,12 @@ public void lazyDestroy() {
 					listener.notifyBufferDestroyed();
 				}
 
+				// notify the potential blocking request thread
+				final CompletableFuture<?> toNotify = availabilityHelper.isAvailable();
+				if (toNotify != AVAILABLE && !toNotify.isDone()) {
+					toNotify.complete(null);
 
 Review comment:
   nit: it is better to move `toNotify.complete(null)` out of `sync` like the other places
did.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message