This is an automated email from the ASF dual-hosted git repository.

jedcunningham pushed a commit to branch v2-9-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 5c6736daeb9910f3b7c5f7c5b166d07841f86261
Author: Daniel Standish <[email protected]>
AuthorDate: Wed Apr 10 20:06:37 2024 -0700

    Don't wait for DagRun lock in mini scheduler (#38914)
    
    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.
    
    (cherry picked from commit afe8e82531cece4f3aeaea465b985ebd7257e71d)
---
 airflow/models/taskinstance.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py
index 2f0d6e27bf..6dedf4bfd2 100644
--- a/airflow/models/taskinstance.py
+++ b/airflow/models/taskinstance.py
@@ -3439,6 +3439,7 @@ class TaskInstance(Base, LoggingMixin):
                     run_id=ti.run_id,
                 ),
                 session=session,
+                nowait=True,
             ).one()
 
             task = ti.task

Reply via email to