azagrebin commented on a change in pull request #13730:
URL: https://github.com/apache/flink/pull/13730#discussion_r512645595



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SlotSharingExecutionSlotAllocator.java
##########
@@ -212,20 +214,24 @@ private ResourceProfile 
getPhysicalSlotResourceProfile(ExecutionSlotSharingGroup
                        .reduce(ResourceProfile.ZERO, (r, e) -> 
r.merge(resourceProfileRetriever.apply(e)), ResourceProfile::merge);
        }
 
-       private SharingPhysicalSlotRequestBulk 
createBulk(Map<ExecutionSlotSharingGroup, List<ExecutionVertexID>> executions) {
-               Map<ExecutionSlotSharingGroup, ResourceProfile> pendingRequests 
= executions
-                       .keySet()
-                       .stream()
-                       .collect(Collectors.toMap(
-                               group -> group,
-                               group -> 
sharedSlots.get(group).getPhysicalSlotResourceProfile()
-                       ));
+       private Optional<SharingPhysicalSlotRequestBulk> createBulk(
+                       Map<ExecutionSlotSharingGroup, List<ExecutionVertexID>> 
executions) {
+               Map<ExecutionSlotSharingGroup, ResourceProfile> pendingRequests 
= new HashMap<>();
+               for (ExecutionSlotSharingGroup group : executions.keySet()) {
+                       SharedSlot sharedSlot = sharedSlots.get(group);
+                       if (sharedSlot == null || 
sharedSlot.getSlotContextFuture().isCompletedExceptionally()) {

Review comment:
       [FLINK-19832](https://issues.apache.org/jira/browse/FLINK-19832)




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


Reply via email to