tzanko-matev commented on issue #14205:
URL: https://github.com/apache/airflow/issues/14205#issuecomment-898881088


   Here is the same logic in the `main` branch: 
   
https://github.com/apache/airflow/blob/721d4e7c60cbccfd064572f16c3941f41ff8ab3a/airflow/jobs/scheduler_job.py#L1004
   ```py
               if dag.max_active_runs and active_runs >= dag.max_active_runs:
                   self.log.debug(
                       "DAG %s already has %d active runs, not moving any more 
runs to RUNNING state %s",
                       dag.dag_id,
                       active_runs,
                       dag_run.execution_date,
                   )
   ```
   After a brief look at the code (without testing) it seems to me that the 
same problem will be happening. Since `last_scheduling_decision` is not updated 
you might end up with the same type of deadlock because you will be examining 
the same batch of dagruns in state `QUEUED` again and again and you won't be 
able to move any of them to state `RUNNING`.
   


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