uranusjr commented on code in PR #58208:
URL: https://github.com/apache/airflow/pull/58208#discussion_r2522488860
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -801,6 +801,7 @@ def fetch_task_instances(
TI.dag_id == dag_id,
TI.run_id == run_id,
)
+ .order_by(TI.task_id)
Review Comment:
```suggestion
.order_by(TI.task_id, TI.map_index)
```
If we’re after stability. This _might_ actually be faster since we have a
unique constraint on `(dag_id, task_id, run_id, map_index)` (the other two are
filtered on in this query) and that’s generally backed by an index.
--
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]