tillrohrmann commented on a change in pull request #17000:
URL: https://github.com/apache/flink/pull/17000#discussion_r697896776



##########
File path: 
flink-tests/src/test/java/org/apache/flink/test/runtime/leaderelection/ZooKeeperLeaderElectionITCase.java
##########
@@ -121,38 +145,39 @@ public void testJobExecutionOnClusterWithLeaderChange() 
throws Exception {
                 final DispatcherGateway leaderDispatcherGateway =
                         getNextLeadingDispatcherGateway(
                                 miniCluster, previousLeaderAddress, timeout);
+                // Make sure resource manager has also changed leadership.
+                resourceManagerLeaderFutures[i].get();

Review comment:
       Did the test become unstable because of your previous change? If yes, 
what is causing the instability? I assume it has something to do that we do the 
leader election for the `Dispatcher` and the `ResourceManager` individually. 
Isn't this also a problem for Flink in general if we have two processes where 
one has the leading `ResourceManager` and the other the leading `Dispatcher`? 
cc @xintongsong this might have been introduced with FLINK-21667.
   
   It seems that we have the assumption in the 
`DispatcherResourceManagerComponent` that we need a `ResourceManager` to 
deregister the application. Before, I think it worked because the 
`ResourceManager` would also do the deregistering w/o having the leadership. 
One way to solve this problem properly, is to do a single leader election for 
the JobManager process. Alternatively, we could think about moving the 
application registration/deregistration to a different place (outside of the 
`ResourceManager`).
   
   I've created https://issues.apache.org/jira/browse/FLINK-24038 to double 
check on the problem.




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