CalvinKirs commented on code in PR #45446:
URL: https://github.com/apache/doris/pull/45446#discussion_r1886133475
##########
fe/fe-core/src/main/java/org/apache/doris/job/task/AbstractTask.java:
##########
@@ -64,26 +64,22 @@ private static long getNextTaskId() {
@Override
public void onFail() throws JobException {
- status = TaskStatus.FAILED;
- if (!isCallable()) {
- return;
+ try {
+ status = TaskStatus.FAILED;
+ if (!isCallable()) {
+ return;
+ }
+ setFinishTimeMs(System.currentTimeMillis());
+ Env.getCurrentEnv().getJobManager().getJob(jobId).onTaskFail(this);
+ } finally {
+ closeOrReleaseResources();
Review Comment:
Yes, this method must be called at the end of every task. onFail, onSuccess,
and cancel all signify the completion of a task.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]