Skip to content

Commit

Permalink
Don't wait for DagRun lock in mini scheduler (apache#38914)
Browse files Browse the repository at this point in the history
We should just bail if something else is already "minischeduling".  We already catch OperationalError so there's nothing else we need to change for this.

Sometimes (e.g. with certain task mapping scenarios) many tasks from same dag run are trying to "minischedule" at the same time.  If something else is already locking, it's probably better to just move on and not wait.
  • Loading branch information
dstandish authored and utkarsharma2 committed Apr 22, 2024
1 parent 672e8c9 commit fa79872
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions airflow/models/taskinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3492,6 +3492,7 @@ def _schedule_downstream_tasks(
run_id=ti.run_id,
),
session=session,
nowait=True,
).one()

task = ti.task
Expand Down

0 comments on commit fa79872

Please sign in to comment.