tillrohrmann commented on a change in pull request #12732:
URL: https://github.com/apache/flink/pull/12732#discussion_r443426402
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
##########
@@ -561,7 +561,11 @@ private void
tryFulfillSlotRequestOrMakeAvailable(AllocatedSlot allocatedSlot) {
allocatedSlots.add(pendingRequest.getSlotRequestId(),
allocatedSlot);
pendingRequest.getAllocatedSlotFuture().complete(allocatedSlot);
- maybeRemapOrphanedAllocation(allocationIdOfRequest,
allocatedSlot.getAllocationId());
+ // the allocation id can be null if the request was
fulfilled by a slot directly offered
+ // by a reconnected TaskExecutor before the
ResourceManager is connected
+ if (allocationIdOfRequest != null) {
Review comment:
I think you could directly ask `pendingRequest.getAllocationId()`. That
way you would not need to query `pendingRequests` again.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
##########
@@ -561,7 +561,11 @@ private void
tryFulfillSlotRequestOrMakeAvailable(AllocatedSlot allocatedSlot) {
allocatedSlots.add(pendingRequest.getSlotRequestId(),
allocatedSlot);
pendingRequest.getAllocatedSlotFuture().complete(allocatedSlot);
- maybeRemapOrphanedAllocation(allocationIdOfRequest,
allocatedSlot.getAllocationId());
+ // the allocation id can be null if the request was
fulfilled by a slot directly offered
+ // by a reconnected TaskExecutor before the
ResourceManager is connected
+ if (allocationIdOfRequest != null) {
Review comment:
Moreover, there is no invariant which states that `pendingRequests`
contains the mapping. Hence, it would also make sense to directly ask
`pendingRequest` here.
----------------------------------------------------------------
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]