ashb commented on a change in pull request #20722:
URL: https://github.com/apache/airflow/pull/20722#discussion_r780129526



##########
File path: airflow/models/dagrun.py
##########
@@ -804,18 +806,42 @@ def verify_integrity(self, session: Session = 
NEW_SESSION):
                 ti.state = State.NONE
             session.merge(ti)
 
-        # check for missing tasks
-        for task in dag.task_dict.values():
-            if task.start_date > self.execution_date and not self.is_backfill:
-                continue
+        def task_filter(task: "BaseOperator"):
+            return task.task_id not in task_ids and (
+                self.is_backfill or task.start_date <= self.execution_date
+            )
+
+        created_counts: Dict[str, int] = Counter()

Review comment:
       Yeah, I had it this way before (hence why Counter in the first place) 
but doing it this way seemed a lot slower. Let me test that again.




-- 
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]


Reply via email to