tillrohrmann commented on a change in pull request #6734: [FLINK-9455][RM] Add 
support for multi task slot TaskExecutors
URL: https://github.com/apache/flink/pull/6734#discussion_r220865298
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
 ##########
 @@ -530,14 +541,50 @@ private void registerSlot(
                        removeSlot(slotId);
                }
 
-               TaskManagerSlot slot = new TaskManagerSlot(
+               final TaskManagerSlot slot = 
createAndRegisterTaskManagerSlot(slotId, resourceProfile, 
taskManagerConnection);
+
+               final PendingTaskManagerSlot pendingTaskManagerSlot;
+
+               if (allocationId == null) {
+                       pendingTaskManagerSlot = 
findExactlyMatchingPendingTaskManagerSlot(resourceProfile);
 
 Review comment:
   Because we use the `ResourceProfile` at the moment as a key for fulfilling 
pending task manager slots. Therefore, we need to find an exactly matching 
resource profile. In the future we could introduce an ID to identify newly 
started slots.
   
   Think for example that you have two pending slots with resource profile 
`(1,1)` and `(2,2)`. Now a slot with `(2,2)` is registered. You don't want to 
complete the pending task manager slot `(1,1)` (even though it would fulfill 
the requirements), because the slot `(1,1)`, won't be able to complete the 
remaining pending task manager slot.
   
   Making the matching algorithm pluggable should be a separate issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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