wangyang0918 commented on a change in pull request #15095:
URL: https://github.com/apache/flink/pull/15095#discussion_r589227565
##########
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:
Hmm. I think we could set `hasLeadership` to `true` after the
`ResourceManager` confirms the leadership. Right?
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesResourceManagerDriver.java
##########
@@ -228,7 +228,7 @@ private void recoverWorkerNodesFromPreviousAttempts()
throws ResourceManagerExce
currentMaxAttemptId = attempt;
}
- if (pod.isTerminated()) {
+ if (pod.isTerminated() || !pod.isScheduled()) {
Review comment:
Out the scope of this PR, maybe we also should not stop the pod when the
current `KubernetesResourceManagerDriver` is not the leader.
----------------------------------------------------------------
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]