Thesharing commented on a change in pull request #15312:
URL: https://github.com/apache/flink/pull/15312#discussion_r601158254



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -176,15 +183,24 @@ public RestartPipelinedRegionFailoverStrategy(
 
             // if a needed input result partition is not available, its 
producer region is involved
             for (SchedulingExecutionVertex vertex : 
regionToRestart.getVertices()) {
-                for (SchedulingResultPartition consumedPartition : 
vertex.getConsumedResults()) {
-                    if (!resultPartitionAvailabilityChecker.isAvailable(
-                            consumedPartition.getId())) {
-                        SchedulingPipelinedRegion producerRegion =
-                                topology.getPipelinedRegionOfVertex(
-                                        
consumedPartition.getProducer().getId());
-                        if (!visitedRegions.contains(producerRegion)) {
-                            visitedRegions.add(producerRegion);
-                            regionsToVisit.add(producerRegion);
+                for (ConsumedPartitionGroup consumedPartitionGroup :
+                        vertex.getConsumedPartitionGroups()) {
+                    if 
(!visitedConsumedResultGroups.contains(consumedPartitionGroup)) {
+                        
visitedConsumedResultGroups.add(consumedPartitionGroup);
+                        for (IntermediateResultPartitionID consumedPartitionId 
:
+                                consumedPartitionGroup) {
+                            if 
(!resultPartitionAvailabilityChecker.isAvailable(

Review comment:
       Thank you for proposing this improvement, @zhuzhurk. I've already 
implemented it in the fix-up commit.




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


Reply via email to