The GitHub Actions job "Tests" on airflow.git/backport-13af96b-v3-1-test has 
succeeded.
Run started by GitHub user pierrejeambrun (triggered by pierrejeambrun).

Head commit for run:
f841564d7abf4b08a254533325574c1aba21f0f0 / Lakshmi Sravya 
<[email protected]>
[v3-1-test] perf: use load_only() in get_dag_runs eager loading to reduce data 
fetched per task instance (#62482)

* perf: use load_only() in eager_load_dag_run_for_validation to reduce data 
fetched

The get_dag_runs API endpoint was slow on large deployments because
eager_load_dag_run_for_validation() used selectinload on task_instances and
task_instances_histories without restricting which columns were fetched.
This caused SQLAlchemy to load all heavyweight columns (executor_config with
pickled data, hostname, rendered fields, etc.) for every task instance across
every DAG run in the result page — even though only dag_version_id is needed
to traverse the association proxy to DagVersion.

Add load_only(TaskInstance.dag_version_id) and
load_only(TaskInstanceHistory.dag_version_id) to the selectinload chains so
the SELECT for task instances fetches only the identity columns and the FK
needed to resolve the dag_version relationship, significantly reducing the
volume of data transferred from the database on busy deployments.

Fixes #62025

* Fix static checks

---------
(cherry picked from commit 13af96b80868ef91ca623d35afcd76003bfbda90)

Co-authored-by: Lakshmi Sravya 
<[email protected]>
Co-authored-by: pierrejeambrun <[email protected]>

Report URL: https://github.com/apache/airflow/actions/runs/22771903048

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to