You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "mohsenrezaeithe (via GitHub)" <gi...@apache.org> on 2023/03/03 23:42:24 UTC

[GitHub] [flink] mohsenrezaeithe commented on a diff in pull request #21849: [FLINK-30596][Runtime/REST] Fix duplicate jobs when submitting with the same jobId

mohsenrezaeithe commented on code in PR #21849:
URL: https://github.com/apache/flink/pull/21849#discussion_r1125140028


##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java:
##########
@@ -1394,13 +1394,14 @@ private CompletableFuture<Void> waitForTerminatingJob(
                                                     throwable));
                                 });
 
-        return jobManagerTerminationFuture.thenAcceptAsync(
+        return FutureUtils.thenAcceptAsyncIfNotDone(

Review Comment:
   Thanks for the suggestion @huwh.
   
   I added a new `submittedAndWaitingTerminationJobs` set for the outstanding jobIds, however, I wasn't sure if the lifecycle of the items in there need to be following the lifecycle of items in `jobManagerRunnerTerminationFutures` in any way.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org