steveahnahn opened a new pull request, #61471:
URL: https://github.com/apache/airflow/pull/61471

   ## Summary
   Optimize multi-team executor resolution in the scheduler by batching dag_id 
-> team_name lookups and passing the resolved team_name into executor 
selection, eliminating per-task DB queries when core.multi_team=true.
   With multi-team enabled, the scheduler can process many task instances per 
loop. Previously, team resolution could trigger repeated database lookups 
(effectively N queries for N task instances) when selecting executors. This PR 
reduces that overhead by resolving team names once per unique DAG ID and 
reusing the results.
   
   - Adds a batched lookup helper to resolve team names for multiple DAG IDs in 
one query 
   - Preserves legacy behavior when core.multi_team=false (no additional 
queries / logic).
   - Add test_multi_team_executor_to_tis_batch_optimization to assert 
_executor_to_tis() performs a single batched query and does not call 
_get_task_team_name().


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