zentol commented on a change in pull request #13553:
URL: https://github.com/apache/flink/pull/13553#discussion_r503150537



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -861,6 +884,8 @@ protected void closeJobManagerConnection(JobID jobId, 
Exception cause) {
 
                        jmResourceIdRegistrations.remove(jobManagerResourceId);
 
+                       
slotManager.processResourceRequirements(ResourceRequirements.empty(jobId, 
jobMasterGateway.getAddress()));

Review comment:
       Current PR state(`closeJobManagerConnection`):
   
   If the _job_ fails, then resources are currently cleaned up immediately, 
because the JM closes the RM connection, leading to 
`closeJobManagerConnection`. The JM is also supposed to reduce the requirements 
to 0.
   
   If the JM _crashes_, then we have to wait for the `heartbeat.timeout`.
   
   Cleanup in removeJob:
   
   Resources are always cleaned up after `resourcemanager.job.timeout`.
   
   
   Conceptually, it seems _correct_ to wait for the job timeout; it's just that 
for the non-HA case this should be set to 0?




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