KevinYang21 commented on a change in pull request #5079: [AIRFLOW-4285] Update
task dependency context defination and usage
URL: https://github.com/apache/airflow/pull/5079#discussion_r300856882
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -863,10 +862,9 @@ def _find_executable_task_instances(self, simple_dag_bag,
states, session=None):
for task_instance in task_instances_to_examine:
pool_to_task_instances[task_instance.pool].append(task_instance)
- states_to_count_as_running = [State.RUNNING, State.QUEUED]
# dag_id to # of running tasks and (dag_id, task_id) to # of running
tasks.
dag_concurrency_map, task_concurrency_map =
self.__get_concurrency_maps(
- states=states_to_count_as_running, session=session)
+ states=STATES_TO_COUNT_AS_RUNNING, session=session)
# Go through each pool, and queue up a task for execution if there are
# any open slots in the pool.
Review comment:
This is the trickiest part: we want to handle this in a Dep in all places,
but we do dependencies checks in batch w/o Dep here in the scheduler logic. The
current Dep is on the task instance level and doesn't really scale very well in
the use case here. I don't yet have a perfect solution to hard weird this part
of logic with Deps :( Maybe add batch processing in the current Deps? Feels
like belongs to another PR.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services