ephraimbuddy commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r884496343
##########
airflow/models/dagrun.py:
##########
@@ -640,15 +640,9 @@ def task_instance_scheduling_decisions(self, session:
Session = NEW_SESSION) ->
tis = list(self.get_task_instances(session=session,
state=State.task_states))
self.log.debug("number of tis tasks for %s: %s task(s)", self,
len(tis))
dag = self.get_dag()
- for ti in tis:
- try:
- ti.task = dag.get_task(ti.task_id)
- except TaskNotFound:
- self.log.warning(
- "Failed to get task '%s' for dag '%s'. Marking it as
removed.", ti, ti.dag_id
- )
- ti.state = State.REMOVED
- session.flush()
+
+ if self.should_verify_integrity(dag, tis, session=session):
Review Comment:
I think it should not be part of it. Running the verify integrity only when
there're missing indexes would save time...
--
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]