smattheis commented on a change in pull request #18865:
URL: https://github.com/apache/flink/pull/18865#discussion_r812077258



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java
##########
@@ -637,13 +672,17 @@ public void go() throws Exception {
                                             numberOfSegmentsToRequest));
                         }
                     };
-            asyncRequest.start();
 
             // recycle 5 segments
             CompletableFuture<?> availableFuture = 
globalPool.getAvailableFuture();
             globalPool.recycleUnpooledMemorySegments(segments1);
             assertTrue(availableFuture.isDone());
 
+            // Starting to requesting next segments only after previous 
segments were release
+            // otherwise the race condition between requesting new segments 
and releasing old ones
+            // are possible:
+            asyncRequest.start();

Review comment:
       Does the async request actually make sense here? I'm not sure if the 
async request adds something relevant to the test case?




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