-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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 cleaning zombie RESTARTING tasks #33706
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
96ef98c
to
8399582
Compare
As discussed in the issue #33706 - that sounds good. But I would love others who know more about inricacise of executors might chime in ? :D |
Renamed to adoptable_states because adoption is preferrable choice and reset is fallback. Also "resettable" might be confused with RESTARTING itself.
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* Fix cleaning zombie RESTARTING tasks * Fix test * Improve naming Renamed to adoptable_states because adoption is preferrable choice and reset is fallback. Also "resettable" might be confused with RESTARTING itself. --------- Co-authored-by: daniel.dylag <[email protected]> (cherry picked from commit 5c35786)
Resolves #33661
Added
RESTARTING
state to the list of task instance states that are handled by scheduler inadopt_or_reset_orphaned_tasks()
. This way the system can recover from the situation when a task was set toRESTARTING
state externally (webserver request) but both task process and scheduler were dead when it happened.This approach is safe because
adopt_or_reset_orphaned_tasks()
only modifies tasks that were queued by a scheduler that is no longer running. In theory it could reset a task which is still running even though its scheduler is dead, but it is identical situation as withRUNNING
tasks which are also updated by this method.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.