njnu-seafish commented on code in PR #17437:
URL:
https://github.com/apache/dolphinscheduler/pull/17437#discussion_r2320611569
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java:
##########
@@ -190,13 +191,13 @@ public TaskResponse run(IShellInterceptorBuilder
iShellInterceptorBuilder,
result.setExitStatusCode(this.process.exitValue());
} else {
- log.error("process has failure, the task timeout configuration
value is:{}, ready to kill ...",
- taskRequest.getTaskTimeout());
+ log.error("process has failure due to timeout kill, timeout value
is:{}, timeoutStrategy is:{}",
+ taskRequest.getTaskTimeout(),
taskRequest.getTaskTimeoutStrategy());
result.setExitStatusCode(EXIT_CODE_FAILURE);
- cancelApplication();
}
int exitCode = this.process.exitValue();
- String exitLogMessage = EXIT_CODE_KILL == exitCode ? "process has
killed." : "process has exited.";
+ String exitLogMessage = (EXIT_CODE_KILL == exitCode ||
EXIT_CODE_HARD_KILL == exitCode) ? "process has killed."
+ : "process has exited.";
Review Comment:
> It's better to check from status in `taskExecutionContext` rather then
check from the exit code, we don't care about the exit, only kill from ds then
we think it's kill.
Here it simply outputs the final execution status of the process, indicating
whether it exited normally or was killed.
--
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]