kaxil commented on a change in pull request #17719:
URL: https://github.com/apache/airflow/pull/17719#discussion_r692998718
##########
File path: airflow/jobs/backfill_job.py
##########
@@ -865,13 +863,7 @@ def reset_state_for_orphaned_tasks(self,
filter_by_dag_run=None, session=None):
if filter_by_dag_run is None:
resettable_tis = (
session.query(TaskInstance)
- .join(
- DagRun,
- and_(
- TaskInstance.dag_id == DagRun.dag_id,
- TaskInstance.execution_date == DagRun.execution_date,
- ),
- )
+ .join(TaskInstance.dag_run)
Review comment:
Worth using `contains_eager` here too?
--
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]