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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
##########
@@ -2064,11 +2101,19 @@ public void jobManagerLostLeadership(final JobID jobId, 
final JobMasterId jobMas
         public void handleError(Throwable throwable) {
             onFatalError(throwable);
         }
+
+        @Override
+        public void jobManagerRejectedRegistration(
+                JobID jobId, String targetAddress, JMTMRegistrationRejection 
rejection) {
+            runAsync(() -> handleRejectedJobManagerConnection(jobId, 
targetAddress, rejection));

Review comment:
       This would only work in HA setups. In non-HA setups asking for the new 
leader information won't change anything.
   
   Moreover, for the HA case we will probably/should never run into the 
rejection case because we register the leader information under the respective 
`JobID`. Only if a new JobManager is started at the same address with the same 
fencing token, we should encounter this problem.
   
   If this should become a problem, then we could opt for a more complex 
solution with timeouts and retries. But for the time being I would like to keep 
it simple.




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