mhenc commented on code in PR #25935:
URL: https://github.com/apache/airflow/pull/25935#discussion_r957267768


##########
airflow/dag_processing/manager.py:
##########
@@ -663,6 +675,12 @@ def _fetch_callbacks(self, max_callbacks: int, session: 
Session = NEW_SESSION):
         with prohibit_commit(session) as guard:
             query = (
                 session.query(DbCallbackRequest)
+                .filter(
+                    or_(
+                        DbCallbackRequest.dag_directory == 
DagProcessorDirectory.get_dag_directory(),
+                        not self.standalone_dag_processor,

Review Comment:
   dag_directory seems to be set if both modes, however I am not sure if I 
covered all the cases or whether there are not problems during migration, so I 
would rather go the safer way. 
   
   I am not an expert in SQL performance, but in case of 
   `dag_directory = OR TRUE` 
   doesn't the SQL reduce is it to `TRUE`? 
   



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