prashantbh commented on code in PR #28201:
URL: https://github.com/apache/flink/pull/28201#discussion_r3556921903


##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterServiceLeadershipRunner.java:
##########
@@ -355,17 +426,48 @@ private void confirmLeadership(
     private void forwardResultFuture(
             UUID leaderSessionId, CompletableFuture<JobManagerRunnerResult> 
resultFuture) {
         resultFuture.whenComplete(
-                (jobManagerRunnerResult, throwable) ->
-                        runIfValidLeader(
-                                leaderSessionId,
-                                () -> onJobCompletion(jobManagerRunnerResult, 
throwable),
-                                "result future forwarding"));
+                (jobManagerRunnerResult, throwable) -> {
+                    rememberGloballyTerminalResultIfCurrentProcess(
+                            leaderSessionId, jobManagerRunnerResult);
+                    runIfValidLeader(
+                            leaderSessionId,
+                            () -> onJobCompletion(jobManagerRunnerResult, 
throwable),
+                            "result future forwarding");
+                });
+    }
+
+    private void rememberGloballyTerminalResultIfCurrentProcess(

Review Comment:
   Done. Keeping `cacheGloballyTerminalResultIfCurrentProcess `.



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