Thesharing commented on code in PR #19275:
URL: https://github.com/apache/flink/pull/19275#discussion_r853251581
##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java:
##########
@@ -1064,15 +1065,39 @@ protected CompletableFuture<CleanupJobState>
jobReachedTerminalState(
terminalJobStatus);
}
- archiveExecutionGraph(executionGraphInfo);
+ writeToExecutionGraphInfoStore(executionGraphInfo);
if (!terminalJobStatus.isGloballyTerminalState()) {
return CompletableFuture.completedFuture(CleanupJobState.LOCAL);
}
+ // do not create an archive for suspended jobs, as this would
eventually lead to
+ // multiple archive attempts which we currently do not support
+ CompletableFuture<Acknowledge> archiveFuture =
+ archiveExecutionGraphToHistoryServer(executionGraphInfo);
+
+ return archiveFuture
+ .thenCompose(
+ ignored ->
+
registerGloballyTerminatedJobInJobResultStore(executionGraphInfo))
+ .thenApply(ignored -> CleanupJobState.GLOBAL);
+ }
+
+ private CompletableFuture<Acknowledge>
registerGloballyTerminatedJobInJobResultStore(
Review Comment:
Thank you for your suggestions, @XComp. I've learned a lot from you. 👍 I've
done this minor fix.
--
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]