KarmaGYZ commented on a change in pull request #11615:
URL: https://github.com/apache/flink/pull/11615#discussion_r415188778



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerImpl.java
##########
@@ -390,6 +392,12 @@ public void registerTaskManager(final 
TaskExecutorConnection taskExecutorConnect
                if 
(taskManagerRegistrations.containsKey(taskExecutorConnection.getInstanceID())) {
                        
reportSlotStatus(taskExecutorConnection.getInstanceID(), initialSlotReport);
                } else {
+                       if 
(isMaxSlotNumExceededAfterRegistration(initialSlotReport)) {
+                               LOG.info("The total number of slots exceeds the 
max limitation {}, release the excess resource.", maxSlotNum);

Review comment:
       It could happen in failover.
   For example, we have 1 TM before failover. Before it registers back to RM, 
the SM could not be aware of it. This time. If the SlotRequest comes in, SM 
will allocate a new TM. If resource allocation success, the total number of 
slots could exceed the max limit.




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


Reply via email to