airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (AIRFLOW-931) LocalExecutor fails to run queued task with race condition
Date Thu, 09 Mar 2017 16:33:38 GMT


ASF subversion and git services commented on AIRFLOW-931:

Commit 4db8f0796642691255b0632d599f33cb9d0ce423 in incubator-airflow's branch refs/heads/v1-8-test
from [~bolke]
[;h=4db8f07 ]

[AIRFLOW-931] Do not set QUEUED in TaskInstances

The contract of TaskInstances stipulates that end
states for Tasks
SKIPPED. If concurrency was reached task instances
were set to
QUEUED by the task instance themselves. This would
prevent the
scheduler to pick them up again.

We set the state to NONE now, to ensure integrity.

Closes #2127 from bolkedebruin/AIRFLOW-931

(cherry picked from commit e42398100a3248eddb6b511ade73f6a239e58090)
Signed-off-by: Bolke de Bruin <>

> LocalExecutor fails to run queued task with race condition
> ----------------------------------------------------------
>                 Key: AIRFLOW-931
>                 URL:
>             Project: Apache Airflow
>          Issue Type: Sub-task
>    Affects Versions: Airflow 1.8, 1.8.0rc4
>            Reporter: Vijay Krishna Ramesh
>            Assignee: Bolke de Bruin
> provides a small
example that consistently hits this problem with LocalExecutor.
> Basically when the dag run kicks off (with concurrency > 1) and a LocalExecutor with
parallelism > 2 the scheduler marks more than concurrency tasks as queued (
> There is a second check before actually running the task (
that leaves the task in the QUEUED state but then the scheduler never picks it back up.  This
causes the DAG to get stuck (as the queued tasks never run) until the scheduler is restarted
(at which point the enqueued tasks are considered orphaned, the status is set to NONE, and
then they are picked up by the scheduler again and run.

This message was sent by Atlassian JIRA

View raw message