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_r335313402
##########
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:
I've seen quite a bit deadlocks from exactly this kind of pattern, maybe not
in this exact place. I think it's a generally speaking good rule of trying to
decouple/release locks from the callbacks. We can not release the higher level
locks (from the callers), but still it would make our live a bit easier in the
future, if we hold as few locks as possible.
----------------------------------------------------------------
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