tillrohrmann commented on a change in pull request #18684:
URL: https://github.com/apache/flink/pull/18684#discussion_r802627308
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
##########
@@ -1176,7 +1176,11 @@ private void allocateSlot(
@Override
public CompletableFuture<Acknowledge> freeSlot(
AllocationID allocationId, Throwable cause, Time timeout) {
- freeSlotInternal(allocationId, cause);
+ // only respond to freeing slots when not shutting down to avoid
freeing slot allocation
+ // information
+ if (isRunning()) {
Review comment:
The behaviour is currently that the JM releases the TM if it gets a
`disconnectTaskExecutor` message. This will then automatically free the slots.
This can also be changed but is by far the more involved change because we have
to distinguish whether the JM wants to release the slots or not in case of a
`TaskExecutor` disconnect. I think there are also other cases when the JM wants
to disconnect from a `TaskExecutor` (e.g. when itself shuts down). In this case
you want to release the slots.
Probably it is a good idea to also guard the `freeInactiveSlots` call.
Yes, it is not trivial only allowing internal messages to be accepted during
the shut down phase of an `RpcEndpoint`. That's why we introduced this
`isRunning` method.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]