-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix](Job)The INSERT execution failed, but the task record status is marked as successful. #44292
[Fix](Job)The INSERT execution failed, but the task record status is marked as successful. #44292
Conversation
…er the QueryState is normal. ### backend Currently, we rely on exception handling to determine success. However, in certain cases, such as execution timeouts, exceptions may not be captured. As a result, the status is incorrectly marked as successful.
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
} catch (Exception e) { | ||
log.warn("execute insert task error, job id is {}, task id is {},sql is {}", getJobId(), | ||
getTaskId(), sql, e); | ||
throw new JobException(e); | ||
throw new JobException(e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use Util.getRootCauseMessage()
to get the root cause, for better debug
run buildall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…marked as successful. (#44292) ### What problem does this PR solve? After a job execution is completed, we need to verify whether the QueryState is normal. Currently, we rely on exception handling to determine success. However, in certain cases, such as execution timeouts, exceptions may not be captured. As a result, the status is incorrectly marked as successful. ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Manual test (add detailed scripts or steps below) ``` select * from tasks('type'='insert') ; +----------------+----------------+---------+-------------------------------+---------+----------------------------------------------+---------------------+---------------------+------------+-------------+---------------+------+ | TaskId | JobId | JobName | Label | Status | ErrorMsg | CreateTime | StartTime | FinishTime | TrackingUrl | LoadStatistic | User | +----------------+----------------+---------+-------------------------------+---------+----------------------------------------------+---------------------+---------------------+------------+-------------+---------------+------+ | 53767413936871 | 53748267972932 | test | 53748267972932_53767413936871 | RUNNING | | 2024-11-19 21:39:46 | 2024-11-19 21:39:46 | | | | root | | 53758617801828 | 53748267972932 | test | 53748267972932_53758617801828 | FAILED | errCode = 2, detailMessage = Execute timeout | 2024-11-19 21:39:37 | 2024-11-19 21:39:37 | | | | root | ```
…marked as successful. (#44292) ### What problem does this PR solve? After a job execution is completed, we need to verify whether the QueryState is normal. Currently, we rely on exception handling to determine success. However, in certain cases, such as execution timeouts, exceptions may not be captured. As a result, the status is incorrectly marked as successful. ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Manual test (add detailed scripts or steps below) ``` select * from tasks('type'='insert') ; +----------------+----------------+---------+-------------------------------+---------+----------------------------------------------+---------------------+---------------------+------------+-------------+---------------+------+ | TaskId | JobId | JobName | Label | Status | ErrorMsg | CreateTime | StartTime | FinishTime | TrackingUrl | LoadStatistic | User | +----------------+----------------+---------+-------------------------------+---------+----------------------------------------------+---------------------+---------------------+------------+-------------+---------------+------+ | 53767413936871 | 53748267972932 | test | 53748267972932_53767413936871 | RUNNING | | 2024-11-19 21:39:46 | 2024-11-19 21:39:46 | | | | root | | 53758617801828 | 53748267972932 | test | 53748267972932_53758617801828 | FAILED | errCode = 2, detailMessage = Execute timeout | 2024-11-19 21:39:37 | 2024-11-19 21:39:37 | | | | root | ```
…d status is marked as successful. #44292 (#44443) Cherry-picked from #44292 Co-authored-by: Calvin Kirs <[email protected]>
…d status is marked as successful. #44292 (#44442) Cherry-picked from #44292 Co-authored-by: Calvin Kirs <[email protected]>
What problem does this PR solve?
After a job execution is completed, we need to verify whether the QueryState is normal.
Currently, we rely on exception handling to determine success. However, in certain cases, such as execution timeouts, exceptions may not be captured. As a result, the status is incorrectly marked as successful.
Release note
None
Check List (For Author)
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)