steveahnahn commented on code in PR #71549:
URL: https://github.com/apache/airflow/pull/71549#discussion_r3824412559
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -2946,8 +2946,7 @@ def _schedule_dag_run(
default=None,
)
for task_instance in unfinished_task_instances:
- task_instance.state = TaskInstanceState.SKIPPED
- session.merge(task_instance)
+ task_instance.set_state(TaskInstanceState.SKIPPED,
session=session)
Review Comment:
nit: `set_state` flushes per call, so this flushes once per skipped TI
instead of the single batched flush after the loop so in a wide timeout that's
N round-trips. Set `end_date`/`duration` inline and keep the one `flush()`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]