SamWheating opened a new pull request #22171:
URL: https://github.com/apache/airflow/pull/22171


   Re: https://github.com/apache/airflow/issues/22160
   
   In some exceedingly rare cases, it's possible to have running tasks without 
a `queued_dttm`. This can cause a scheduler crashloop during task adoption as 
the executor tries to calculate the adoption timeout. 
   
   
https://github.com/apache/airflow/blob/9e6769206e124b65d31028a3b7b9047d51fd0be5/airflow/executors/celery_executor.py#L546
   
   But this can be skipped, as if the task is running then the 
`adopted_task_timeouts` value is cleared almost immediately after it is set.
   
https://github.com/apache/airflow/blob/9e6769206e124b65d31028a3b7b9047d51fd0be5/airflow/executors/celery_executor.py#L549
   
https://github.com/apache/airflow/blob/9e6769206e124b65d31028a3b7b9047d51fd0be5/airflow/executors/celery_executor.py#L474-L476
   
   So by not setting the `adoption_task_timeout` for a running task, we can 
avoid ever accessing the `queued_dttm` and thus avoid the scheduler crash. 


-- 
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]


Reply via email to