kumar-mallikarjuna commented on code in PR #25027:
URL: https://github.com/apache/flink/pull/25027#discussion_r1679572415


##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/DefaultJobManagerRunnerRegistry.java:
##########
@@ -85,7 +85,16 @@ public Collection<JobManagerRunner> getJobManagerRunners() {
     @Override
     public CompletableFuture<Void> localCleanupAsync(JobID jobId, Executor 
unusedExecutor) {
         if (isRegistered(jobId)) {
-            return unregister(jobId).closeAsync();
+            CompletableFuture<Void> resultFuture = 
this.jobManagerRunners.get(jobId).closeAsync();
+
+            resultFuture.whenComplete(
+                    (result, throwable) -> {
+                        if (throwable == null) {
+                            unregister(jobId);

Review Comment:
   Hi @XComp, I had to pass the `mainExecutor` to `DefaultJobManagerRegistry`. 
Can you please take a look if that makes sense?



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

Reply via email to