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

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
 ##########
 @@ -528,7 +535,11 @@ public void failSlot(
 
        private void internalFailAllocation(AllocationID allocationId, 
Exception cause) {
                final Optional<ResourceID> resourceIdOptional = 
slotPool.failAllocation(allocationId, cause);
-               resourceIdOptional.ifPresent(this::releaseEmptyTaskManager);
+               resourceIdOptional.ifPresent(taskManagerId -> {
+                       if 
(!partitionTable.hasTrackedPartitions(taskManagerId)) {
 
 Review comment:
   nit: if we put the if (!partitionTable.hasTrackedPartitions(taskManagerId)) 
inside the method of releaseEmptyTaskManager, we could reuse it if release 
might be reused in other parts future.

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


With regards,
Apache Git Services

Reply via email to