pnowojski commented on a change in pull request #9905: [FLINK-14396][network] 
Implement rudimentary non-blocking network output
URL: https://github.com/apache/flink/pull/9905#discussion_r334920227
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -629,14 +627,9 @@ private void queueChannel(InputChannel channel) {
 
                        if (availableChannels == 0) {
                                inputChannelsWithData.notifyAll();
-                               toNotify = isAvailable;
-                               isAvailable = AVAILABLE;
+                               resetAvailable();
                        }
                }
-
-               if (toNotify != null) {
-                       toNotify.complete(null);
-               }
 
 Review comment:
   Executing `toNotify.complete(null);` under the `synchronized 
(inputChannelsWithData)` almost for sure will cause deadlocks.
   
   Because of that, to have an abstract implementation, `resetAvailable()` 
would have to return `toNotify` action, that would have to be called manually 
after releasing the lock (or something like that).

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