apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
37.27k stars 14.34k forks source link

[edge] Clean up of dead tasks in edge_jobs table #44280

Closed AutomationDev85 closed 3 hours ago

AutomationDev85 commented 15 hours ago

Description

This PR fixes the issue with dead edge jobs stay in edge_job table. If worker died or was not able to update the state of a job, the task will stay forever in the table. To fix this the job last_update will be checked with the SCHEDULER_ZOMBIE_TASK_THRESHOLD time to detect zombie task and state will be set to REMOVED. A job in state REMOVED will be deleted after job_fail_purge time archived

Details about changes