ruanwenjun commented on issue #17342:
URL: 
https://github.com/apache/dolphinscheduler/issues/17342#issuecomment-3086140866

   > > Once the task executor has been take-over, will reassign the master host 
of task executor, and the unreported task executor event of the task executor 
will be resent after 3 min, isn't this work?
   > 
   > not all cases, if event are already in event channel, the workflow's host 
of event won't be updated.
   
   We do update the workflow's host, there might exist concurrent issue, it's 
better to get the workflow's host from executor, once the event ready to 
report, then get the host from executor.
   ```
   public boolean reassignWorkflowInstanceHost(final 
TaskExecutorReassignMasterRequest taskExecutorReassignMasterRequest) {
           final int taskInstanceId = 
taskExecutorReassignMasterRequest.getTaskInstanceId();
           final String workflowHost = 
taskExecutorReassignMasterRequest.getWorkflowHost();
           // todo: Is this reassign can make sure there is no concurrent 
problem?
           physicalTaskExecutorRepository.get(taskInstanceId).ifPresent(
                   taskExecutor -> 
taskExecutor.getTaskExecutionContext().setWorkflowInstanceHost(workflowHost));
           return 
physicalTaskExecutorEventReporter.reassignWorkflowInstanceHost(taskInstanceId, 
workflowHost);
       }
   ```


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