TongWenbin commented on PR #10541:
URL: 
https://github.com/apache/dolphinscheduler/pull/10541#issuecomment-1842020168

   > > Why was this piece of code deleted? This deletion causes an issue where, 
during retries, a new instance isn't generated. As a result, the logs of the 
old instance become inaccessible. More critically, it fails to update the 
'startTime', causing the newly retried instance to immediately time out and 
fail upon startup. ` 
```为什么删除了这段代码?此删除会导致在重试期间未生成新实例的问题。因此,旧实例的日志变得不可访问。更关键的是,它无法更新“startTime”,导致新重试的实例在启动时立即超时并失败。`
 ```
   > > ```
   > >     if (taskInstance.getState().typeIsFailure()) {
   > >         if (taskInstance.isSubProcess()) {
   > >             taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1);
   > >         } else {
   > >             if (processInstanceState != ExecutionStatus.READY_STOP
   > >                     && processInstanceState != 
ExecutionStatus.READY_PAUSE) {
   > >                 // failure task set invalid
   > >                 taskInstance.setFlag(Flag.NO);
   > >                 updateTaskInstance(taskInstance);
   > >                 // crate new task instance
   > >                 if (taskInstance.getState() != 
ExecutionStatus.NEED_FAULT_TOLERANCE) {
   > >                     
taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1);
   > >                 }
   > >                 taskInstance.setSubmitTime(null);
   > >                 taskInstance.setLogPath(null);
   > >                 taskInstance.setExecutePath(null);
   > >                 taskInstance.setStartTime(null);
   > >                 taskInstance.setEndTime(null);
   > >                 taskInstance.setFlag(Flag.YES);
   > >                 taskInstance.setHost(null);
   > >                 taskInstance.setId(0);
   > >             }
   > >         }
   > >     if (processInstanceState.typeIsFinished() || processInstanceState == 
ExecutionStatus.READY_STOP) {
   > >         logger.warn("processInstance {} was {}, skip submit task", 
processInstance.getProcessDefinitionCode(), processInstanceState);
   > >         return null;
   > >     }
   > >     if (processInstanceState == ExecutionStatus.READY_PAUSE) {
   > >         taskInstance.setState(ExecutionStatus.PAUSE);
   > >     }
   > > ```
   > 
   > After my review, I don't think this is a bug. This is to modify the logic 
of creating a new task instance from the previous retry to retry in the same 
task instance, and the log will still not disappear in the same task instance. 
This should not be modified with a new start time. This is missing a document 
description.经过我的评论,我不认为这是一个错误。这是将上次重试创建新任务实例的逻辑修改为在同一个任务实例中重试,日志在同一个任务实例中仍然不会消失。这不应使用新的开始时间进行修改。这缺少文档说明。
   
   but we can't simply get old logs from the interface, and the log only shows 
the latest one, we won't know what causes the failure, and retry don't work at 
all in shell node


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