Github user KurtYoung commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2571#discussion_r82134943
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ---
    @@ -245,22 +255,26 @@ public TaskExecutorGateway call() throws Exception {
                                                resourceID, 
taskExecutorAddress, leaderSessionID, resourceManagerLeaderId);
                                        throw new Exception("Invalid leader 
session id");
                                }
    -                           return 
getRpcService().connect(taskExecutorAddress, TaskExecutorGateway.class).get(5, 
TimeUnit.SECONDS);
    +                           return 
getRpcService().connect(taskExecutorAddress, TaskExecutorGateway.class)
    +                                   .get(timeout.toMilliseconds(), 
timeout.getUnit());
                        }
                }).handleAsync(new BiFunction<TaskExecutorGateway, Throwable, 
RegistrationResponse>() {
                        @Override
                        public RegistrationResponse apply(TaskExecutorGateway 
taskExecutorGateway, Throwable throwable) {
                                if (throwable != null) {
                                        return new 
RegistrationResponse.Decline(throwable.getMessage());
                                } else {
    -                                   WorkerType oldWorker = 
taskExecutorGateways.remove(resourceID);
    -                                   if (oldWorker != null) {
    +                                   WorkerRegistration oldRegistration = 
taskExecutors.remove(resourceID);
    +                                   if (oldRegistration != null) {
                                                // TODO :: suggest old 
taskExecutor to stop itself
                                                
slotManager.notifyTaskManagerFailure(resourceID);
    --- End diff --
    
    notifyTaskManagerFailure is called again in 
slotManager.registerTaskExecutor, maybe we should only keep one of these


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to