Nataneljpwd commented on code in PR #61769:
URL: https://github.com/apache/airflow/pull/61769#discussion_r2837208217
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -1738,15 +1738,23 @@ def xcom_pull(
@provide_session
def get_num_running_task_instances(self, session: Session, same_dagrun:
bool = False) -> int:
- """Return Number of running TIs from the DB."""
+ """
+ Return number of active TIs for this task from the DB.
+
+ Counts task instances in running, queued, or deferred state.
+ Deferred TIs are included because they are still logically in-flight
+ and must count against max_active_tis_per_dag /
max_active_tis_per_dagrun.
+ """
Review Comment:
If we consider deferred tasks as running, isn't it logical that the
`max_active_tasks` also takes the deferred tasks into consideration?
--
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]