You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "prashantbh (via GitHub)" <gi...@apache.org> on 2026/07/10 06:46:13 UTC

Re: [PR] [FLINK-39704][runtime/jobmaster] Preserve globally terminal job result across leadership revocation [flink]

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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterServiceLeadershipRunner.java:
##########
@@ -241,29 +254,83 @@ public boolean isInitialized() {
 
     @Override
     public void grantLeadership(UUID leaderSessionID) {
-        runIfStateRunning(
-                () -> startJobMasterServiceProcessAsync(leaderSessionID),
-                "starting a new JobMasterServiceProcess");
+        synchronized (lock) {

Review Comment:
   Good point, no reason to inline it. Restored `runIfStateRunning` and just moved the composition into `startJobMasterServiceProcessAsync`. Done.



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