potiuk commented on code in PR #39745:
URL: https://github.com/apache/airflow/pull/39745#discussion_r1615204620


##########
airflow/models/taskinstance.py:
##########
@@ -3476,8 +3476,13 @@ def _schedule_downstream_tasks(
                     run_id=ti.run_id,
                 ),
                 session=session,
-                nowait=True,
-            ).one()
+                skip_locked=True,
+            ).one_or_none()
+
+            if not dag_run:
+                cls.logger().info("Skip locked rows, rollback")
+                session.rollback()

Review Comment:
   The "schedule_downstream_tasks" is only executed in a new session, so 
rollback is safe here, just in case.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to