pnowojski commented on a change in pull request #8361: [FLINK-12434][network]
Replace listeners with CompletableFuture in InputGates
URL: https://github.com/apache/flink/pull/8361#discussion_r282101499
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
##########
@@ -171,8 +172,7 @@
/** Flag indicating whether all resources have been released. */
private volatile boolean isReleased;
- /** Registered listener to forward buffer notifications to. */
- private volatile InputGateListener inputGateListener;
+ private CompletableFuture<?> isAvailable = AVAILABLE;
Review comment:
Yes, I was thinking about that, but decided that it might not be worth it
yet, but I could be easily persuaded if you think opposite. Could adding an
abstract base class cause some more troubles for JIT (like de-virtualisation)?
I deemed thinking/answering this question not worth the extra effort compared
to this small code duplication. Maybe I'm paranoid, but since recently I've
lost a faith in the JVM.
----------------------------------------------------------------
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