You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/04/10 19:04:14 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #30372: Optimize performance of scheduling mapped tasks

uranusjr commented on code in PR #30372:
URL: https://github.com/apache/airflow/pull/30372#discussion_r1161995449


##########
airflow/models/dagrun.py:
##########
@@ -1274,37 +1280,44 @@ def schedule_tis(self, schedulable_tis: Iterable[TI], session: Session = NEW_SES
                 schedulable_ti_ids.append((ti.task_id, ti.map_index))
 
         count = 0
+        max_tis_per_query = airflow_conf.getint("scheduler", "max_tis_per_query")

Review Comment:
   Since this function is actually called by a Job object, which would have the `max_tis_per_query` attribute available, we should make the Job pass the value in as an argument instead of reading from config. The less magic global values, the better.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org