tillrohrmann commented on a change in pull request #16856:
URL: https://github.com/apache/flink/pull/16856#discussion_r691970760



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/DefaultExecutionGraph.java
##########
@@ -1279,10 +1279,14 @@ private void releasePartitions(final 
List<IntermediateResultPartitionID> releasa
 
             // Remove cached ShuffleDescriptor when partition is released
             releasablePartitions.stream()
-                    
.map(IntermediateResultPartitionID::getIntermediateDataSetID)
+                    .map(edgeManager::getConsumedPartitionGroupsById)
+                    .flatMap(List::stream)
                     .distinct()
-                    .map(intermediateResults::get)
-                    .forEach(IntermediateResult::notifyPartitionChanged);
+                    .forEach(
+                            group ->
+                                    intermediateResults
+                                            
.get(group.getFirst().getIntermediateDataSetID())
+                                            .notifyPartitionChanged(group));

Review comment:
       Why is it possible that we release all consumer groups based on a 
released partition? If I understand the code correctly, then it should be 
possible that a single result partition belongs to one or more 
`ConsumerPartitionGroups`. If this is correct, then all consuming 
`ConsumerVertexGroups` need to finish in order to be allowed to remove the 
cached entries for every `ConsumerPartitionGroups`. Is this guaranteed at this 
point?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to