uranusjr commented on a change in pull request #19758:
URL: https://github.com/apache/airflow/pull/19758#discussion_r756703569



##########
File path: airflow/api_connexion/endpoints/dag_endpoint.py
##########
@@ -77,7 +77,7 @@ def get_dags(limit, session, offset=0, only_active=True, 
tags=None, dag_id_patte
         cond = [DagModel.tags.any(DagTag.name == tag) for tag in tags]
         dags_query = dags_query.filter(or_(*cond))
 
-    total_entries = len(dags_query.all())
+    total_entries = dags_query.count()

Review comment:
       I don’t think this is an issue here because `dags_query` does not have 
things like JOIN and shouldn’t need to be deduplicated. And even if it is, we 
arguably _should_ add deduplication logic to `dags_query` (otherwise offset and 
limit won’t work right), which will make `count()` correct in the end.




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