azagrebin commented on a change in pull request #7255: [FLINK-10945] Use 
InputDependencyConstraint to avoid resource dead…
URL: https://github.com/apache/flink/pull/7255#discussion_r241328666
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
 ##########
 @@ -726,6 +728,56 @@ void sendPartitionInfos() {
                }
        }
 
+       /**
+        * Check whether the InputDependencyConstraint is satisfied for this 
vertex.
+        *
+        * @return whether the input constraint is satisfied
+        */
+       public boolean checkInputDependencyConstraints() {
 
 Review comment:
   True, thanks for explanation (related with the input edges and EAGER mode).
   
   As for ANY check, my thinking was not about O(N). I meant that currently we 
do not have any check by default but have the logic of `ANY`. That is why I am 
saying theoretically we change the current code adding the check. Although, 
practically I do not see any problem to do the check because it should not 
change any thing. It is just not needed.
   
   Modifying the `if` as you suggest with shortcut of `ANY` is one way to keep 
it exactly as it was. I would suggest to move it inside 
`checkInputDependencyConstraints`:
   `return getExecutionGraph().getInputDependencyConstraint() == 
InputDependencyConstraint.ANY || 
jobVertex.getInputs().stream().allMatch(this::isInputConsumable)`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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