jinxing64 commented on a change in pull request #16118:
URL: https://github.com/apache/flink/pull/16118#discussion_r670323121



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/JobMasterPartitionTrackerImpl.java
##########
@@ -78,6 +77,22 @@ public void startTrackingPartition(
                 producingTaskExecutorId, resultPartitionId, 
resultPartitionDeploymentDescriptor);
     }
 
+    @Override
+    public Collection<PartitionTrackerEntry<ResourceID, 
ResultPartitionDeploymentDescriptor>>
+            stopTrackingPartitionsFor(ResourceID producingTaskExecutorId) {
+        Preconditions.checkNotNull(producingTaskExecutorId);
+
+        // stop tracking partitions which are accommodated on TM
+        Set<ResultPartitionID> rIds =
+                
partitionTable.getTrackedPartitions(producingTaskExecutorId).stream()
+                        .map(rId -> partitionInfos.get(rId).getMetaInfo())
+                        
.filter(JobMasterPartitionTrackerImpl::isPartitionWithLocalResources)
+                        .map(desc -> 
desc.getShuffleDescriptor().getResultPartitionID())
+                        .collect(Collectors.toSet());
+        partitionTable.stopTrackingPartitions(producingTaskExecutorId);

Review comment:
       Since we agree that an external partition will not be registered into 
`partitionTable` when `startTrackingPartition`, I think this change is not 
needed and I will keep the original code as it was




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to