wcmolin opened a new issue, #12167:
URL: https://github.com/apache/dolphinscheduler/issues/12167

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   Nodes A and B run in parallel, node B sets the number of retries to 1, and 
the interval is 1 minute. Node A succeeds after 10 seconds of running, node B 
fails immediately, node B will be submitted to standByList, and node A will run 
WorkflowExecuteThread.submitStandByTask after successful execution. , it will 
submit the retry task of node B. At this time, only 10 seconds have passed, and 
the interval time has not exceeded.
   
   ### What you expected to happen
   
   Node B submits after the interval
   
   ### How to reproduce
   
   Node A:
   <img width="1289" alt="1" 
src="https://user-images.githubusercontent.com/11606262/192489048-6bef5572-6b83-4933-bbd8-518d5d5c93f8.png";>
   
   Node B:
   <img width="1299" alt="2" 
src="https://user-images.githubusercontent.com/11606262/192488595-cfbe6057-957b-4bfc-abe2-8081c2c9f891.png";>
   
   
   This is the task log for node B:
   ```
   [LOG-PATH]: /data/dolphinscheduler/taskLogs/7019509888064_1/5590/39196.log, 
[HOST]:  192.168.191.14
   [INFO] 2022-09-27 17:18:49.075 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[83] - shell task 
params {"resourceList":[],"localParams":[],"rawScript":"echo 
B\nexit(-1)","dependence":{},"conditionResult":{"successNode":[],"failedNode":[]},"waitStartTimeout":{},"switchResult":{}}
   [INFO] 2022-09-27 17:18:49.081 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[137] - raw script : 
echo B
   exit(-1)
   [INFO] 2022-09-27 17:18:49.081 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[138] - task execute 
path : 
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196
   [INFO] 2022-09-27 17:18:49.082 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[86] - tenantCode 
user:dop_tenant, task dir:5590_39196
   [INFO] 2022-09-27 17:18:49.082 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[91] - create command 
file:/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196.command
   [INFO] 2022-09-27 17:18:49.082 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[117] - command : 
#!/bin/sh
   BASEDIR=$(cd `dirname $0`; pwd)
   cd $BASEDIR
   export SPARK_HOME2=/opt/cloudera/parcels/SPARK2/lib/spark2
   export JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera
   export HADOOP_HOME=/opt/cloudera/parcels/CDH/lib/hadoop
   export FLINK_HOME=/opt/flink-1.14.2
   
   export 
PATH=$FLINK_HOME/bin:$SPARK_HOME2/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$PATH
   
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196_node.sh
   [INFO] 2022-09-27 17:18:49.086 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[287] - task run 
command: sudo -u dop_tenant sh 
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196.command
   [INFO] 2022-09-27 17:18:49.087 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[178] - process start, 
process id is: 27939
   [INFO] 2022-09-27 17:18:50.088 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[69] -  -> welcome to 
use bigdata scheduling system...
   [INFO] 2022-09-27 17:18:59.120 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[202] - process has 
exited, execute 
path:/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196,
 processId:27939 ,exitStatusCode:2 ,processWaitForStatus:true 
,processExitValue:2
   [INFO] 2022-09-27 17:19:00.088 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[69] -  -> B
        
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196_node.sh:
 line 2: syntax error near unexpected token `-1'
        
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196_node.sh:
 line 2: `exit(-1)'
   [INFO] 2022-09-27 17:19:00.089 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[63] - FINALIZE_SESSION
   [INFO] 2022-09-27 17:19:10.630 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[83] - shell task 
params {"resourceList":[],"localParams":[],"rawScript":"echo 
B\nexit(-1)","dependence":{},"conditionResult":{"successNode":[],"failedNode":[]},"waitStartTimeout":{},"switchResult":{}}
   [INFO] 2022-09-27 17:19:10.637 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[137] - raw script : 
echo B
   exit(-1)
   [INFO] 2022-09-27 17:19:10.637 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[138] - task execute 
path : 
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196
   [INFO] 2022-09-27 17:19:10.637 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[86] - tenantCode 
user:dop_tenant, task dir:5590_39196
   [INFO] 2022-09-27 17:19:10.637 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[91] - create command 
file:/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196.command
   [INFO] 2022-09-27 17:19:10.637 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[117] - command : 
#!/bin/sh
   BASEDIR=$(cd `dirname $0`; pwd)
   cd $BASEDIR
   export SPARK_HOME2=/opt/cloudera/parcels/SPARK2/lib/spark2
   export JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera
   export HADOOP_HOME=/opt/cloudera/parcels/CDH/lib/hadoop
   export FLINK_HOME=/opt/flink-1.14.2
   
   export 
PATH=$FLINK_HOME/bin:$SPARK_HOME2/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$PATH
   
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196_node.sh
   [INFO] 2022-09-27 17:19:10.641 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[287] - task run 
command: sudo -u dop_tenant sh 
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196.command
   [INFO] 2022-09-27 17:19:10.642 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[178] - process start, 
process id is: 28007
   [INFO] 2022-09-27 17:19:10.668 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[202] - process has 
exited, execute 
path:/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196,
 processId:28007 ,exitStatusCode:2 ,processWaitForStatus:true 
,processExitValue:2
   [INFO] 2022-09-27 17:19:11.643 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[69] -  -> welcome to 
use bigdata scheduling system...
        B
        
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196_node.sh:
 line 2: syntax error near unexpected token `-1'
        
/tmp/dolphinscheduler/exec/process/3756602181664/7019509888064_1/5590/39196/5590_39196_node.sh:
 line 2: `exit(-1)'
   [INFO] 2022-09-27 17:19:11.643 TaskLogLogger-class 
org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[63] - FINALIZE_SESSION
   
   ```
   
   ### Anything else
   
   @JinyLeeChina #10541
   Can you see if this is correct?
   
   <img width="997" alt="3" 
src="https://user-images.githubusercontent.com/11606262/192491022-1b16fcb9-d8eb-406a-8e38-52efbc4d23be.png";>
   
   Then I don't understand this code, can you please explain?
   Start on line `429` of this 
`org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThread` class
   
   ```
   if (task.taskCanRetry()) {
       TaskInstance retryTask = 
processService.findTaskInstanceById(task.getId());
       if (retryTask.isDependTask()) {
           retryTask.setRetryTimes(retryTask.getRetryTimes() + 1);
           if (retryTask.taskCanRetry()) {
               addTaskToStandByList(retryTask);
               this.taskRetryCheckList.put(retryTask.getId(), retryTask);
           }
       } else {
           addTaskToStandByList(retryTask);
           this.taskRetryCheckList.put(retryTask.getId(), retryTask);
       }
   }
   ```
   
   ### Version
   
   2.0.6
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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