Skip to content
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 AbstractTask's handle method exception #1490

Merged
merged 2 commits into from
Dec 17, 2019
Merged

fix AbstractTask's handle method exception #1490

merged 2 commits into from
Dec 17, 2019

Conversation

clay4megtr
Copy link
Contributor

What is the purpose of the pull request

This pull request is mainly fix the bug of AbstractTask class;

when the task is executed by TaskScheduleThread, task.handle () will be called to trigger the execution logic of the task itself. If the task throw a exception, it will capture and call the kill () method to kill the task and set the task status to failed

However, when each task subclass overrides the handle () method, it chooses to catch the exception itself and print the error log without throwing it.

This will cause the TaskScheduleThread thread to execute task but can't catch the task exception forever. The logic of killing the task cannot be triggered forever, and the completion status of the task may not be set correctly.

Brief change log

add throw e to subclass of AbstractTask

Verify this pull request

This pull request is bug fix without any test coverage.

@codecov-io
Copy link

Codecov Report

Merging #1490 into dev will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##             dev   #1490      +/-   ##
========================================
+ Coverage   2.69%    2.7%   +<.01%     
========================================
  Files        271     271              
  Lines      13593   13589       -4     
  Branches    2159    2157       -2     
========================================
  Hits         367     367              
+ Misses     13209   13205       -4     
  Partials      17      17
Impacted Files Coverage Δ
.../server/worker/task/processdure/ProcedureTask.java 0% <0%> (ø) ⬆️
...nscheduler/server/worker/task/shell/ShellTask.java 0% <0%> (ø) ⬆️
...er/server/worker/task/dependent/DependentTask.java 0% <0%> (ø) ⬆️
...cheduler/server/worker/task/python/PythonTask.java 0% <0%> (ø) ⬆️
...hinscheduler/server/worker/task/http/HttpTask.java 0% <0%> (ø) ⬆️
...scheduler/server/worker/task/AbstractYarnTask.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db786c6...2943f38. Read the comment docs.

Copy link
Contributor

@qiaozhanwei qiaozhanwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor

@lgcareer lgcareer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor

@lenboo lenboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lenboo lenboo merged commit 15d5d66 into apache:dev Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants