xintongsong commented on a change in pull request #15095:
URL: https://github.com/apache/flink/pull/15095#discussion_r589245658



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -1200,7 +1202,7 @@ public void grantLeadership(final UUID 
newLeaderSessionID) {
 
             startServicesOnLeadership();
 
-            return prepareLeadershipAsync().thenApply(ignored -> true);
+            return prepareLeadershipAsync().thenApply(ignored -> hasLeadership 
= true);

Review comment:
       I'm setting `hasLeadership` to `true` here because this is the last step 
in the rpc main thread. Confirming leadership happens on the io thread, and 
should trigger fatal error shutdown once failed.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to