gaoyunhaii commented on a change in pull request #8925: [FLINK-12852][network] 
Fix the deadlock occured when requesting exclusive buffers
URL: https://github.com/apache/flink/pull/8925#discussion_r302353092
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java
 ##########
 @@ -177,7 +193,8 @@ public void recycle(MemorySegment segment) {
 
                final List<MemorySegment> segments = new 
ArrayList<>(numberOfSegmentsToRequest);
                try {
-                       while (segments.size() < numberOfSegmentsToRequest) {
+                       final Deadline deadline = 
Deadline.now().plus(Duration.ofMillis(requestSegmentsTimeoutInMillis));
 
 Review comment:
   Very thanks for the tips and changed to `fromNow`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to