Race condition in CeleryExecutor with multiple schedulers causing duplicate TaskInstance execution #63249
Unanswered
prayaagmahajan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened
We observed a race condition in Airflow 3.1.7 when running with:
A single TaskInstance was executed by two Celery workers simultaneously, resulting in inconsistent scheduler state updates.
Specifically:
two different external_executor_id values appeared for the same TaskInstance
the scheduler received executor events with different try_numbers
events were processed out of order, causing the task state to be corrupted
Example observed sequence:
This resulted in the scheduler logging:
Executor reported state=failed but TaskInstance state=running
and the DAG run ultimately failing.
Scheduler log:
Error:
Celery worker logs show two separate executions:
and
Beta Was this translation helpful? Give feedback.
All reactions