pnowojski commented on a change in pull request #9779: [FLINK-14214][runtime] 
Shortcut isAvailable().isDone() anti-starvation check in StreamTwoInputProcesso
URL: https://github.com/apache/flink/pull/9779#discussion_r330439285
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java
 ##########
 @@ -293,9 +291,12 @@ private void updateAvailability(InputStatus status, 
StreamTaskInput input) {
        }
 
        private void checkAndSetAvailable(int inputIndex) {
-               StreamTaskInput input = getInput(inputIndex);
+               CompletableFuture<?> inputAvailable = 
getInput(inputIndex).isAvailable();
 
 Review comment:
   Ok. Now I fully understood what you meant. I thought that there used to be 
no `EOF` check at all. `isAvailable()` call should be fast and the overheads 
that you are worried shouldn't matter. Furthermore, I would expect those 
instructions to be re-ordered by JIT anyway.
   
   But for the peace of our minds I will restore the previous order of those 
checks.  

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