xintongsong commented on a change in pull request #11615: [FLINK-16605] Add max 
limitation to the total number of slots
URL: https://github.com/apache/flink/pull/11615#discussion_r407382464
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerImpl.java
 ##########
 @@ -389,6 +389,12 @@ public void registerTaskManager(final 
TaskExecutorConnection taskExecutorConnect
                if 
(taskManagerRegistrations.containsKey(taskExecutorConnection.getInstanceID())) {
                        
reportSlotStatus(taskExecutorConnection.getInstanceID(), initialSlotReport);
                } else {
+                       if (getNumberRegisteredSlots() + 
Math.max(getNumberPendingTaskManagerSlots(), numSlotsPerWorker) > maxSlotNum) {
 
 Review comment:
   I think this `if` condition assumes that the pending slots can be consumed 
by the new registered slots. In other words, the resource profiles of the 
registered slots matches the pending slots exactly. I think this is a quite 
strong assumption. It might be true at the moment, but will weaken the 
generality of `SlotManagerImpl`.
   
   I would suggest to check whether the registered slots can be matched to the 
pending slots here, and decide whether to release the registered task executor 
based on the checkin gresult.

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