azagrebin commented on a change in pull request #8778: 
[FLINK-12615][coordination] Track partitions on JM
URL: https://github.com/apache/flink/pull/8778#discussion_r298540751
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
 ##########
 @@ -1325,22 +1324,8 @@ private void sendCancelRpcCall(int numberRetries) {
 
        private void sendReleaseIntermediateResultPartitionsRpcCall() {
                LOG.info("Discarding the results produced by task execution 
{}.", attemptId);
-               final LogicalSlot slot = assignedResource;
-
-               if (slot != null) {
-                       final TaskManagerGateway taskManagerGateway = 
slot.getTaskManagerGateway();
-
-                       Collection<IntermediateResultPartition> partitions = 
vertex.getProducedPartitions().values();
-                       Collection<ResultPartitionID> partitionIds = new 
ArrayList<>(partitions.size());
-                       for (IntermediateResultPartition partition : 
partitions) {
-                               partitionIds.add(new 
ResultPartitionID(partition.getPartitionId(), attemptId));
-                       }
-
-                       if (!partitionIds.isEmpty()) {
-                               // TODO For some tests this could be a problem 
when querying too early if all resources were released
-                               
taskManagerGateway.releasePartitions(getVertex().getJobId(), partitionIds);
-                       }
-               }
+               final PartitionTracker partitionTracker = 
getVertex().getExecutionGraph().getPartitionTracker();
+               
partitionTracker.stopTrackingAndReleasePartitions(getAttemptId());
 
 Review comment:
   looks like we are still doing it in cancel and and suspend

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to