nailo2c commented on PR #58543:
URL: https://github.com/apache/airflow/pull/58543#issuecomment-4152180280
1. Here is a rough diagram to describe this feature.
<details>
<summary>AssetAndTimeSchedule</summary>
```mermaid
flowchart TD
A[Timetable matches] --> B[Create scheduled DagRun in QUEUED]
B --> C{Scheduler examines queued run}
C -->|queued wait exceeds dagrun_timeout| D[Mark DagRun FAILED]
C -->|asset condition not met| E[Keep DagRun QUEUED]
C -->|asset condition met| F[Consume selected ADRQ rows]
F --> G[Move DagRun to RUNNING]
```
</details>
2. While refactoring this PR, I found a backlog scenario that can lead to
unexpected behavior.
If the upstream produces an asset every 10 minutes and the downstream Dag
is scheduled every 5 minutes:
```
consumer: 10 -> 15 -> 20
producer: 10 -> X -> 20
```
the queued DagRun at 15 can block the DagRun at 20, even though the asset
for 20 is already ready.
To reduce this problem, I added a timeout for runs that stay queued waiting
for assets:
[code](https://github.com/apache/airflow/pull/58543/changes#diff-072241d81275cd4b4b867f51025e9dca800610069305cffeb4b77ad45e135557R2251-R2276)
It works well on my local airflow.
<img width="1848" height="859" alt="Screenshot 2026-03-29 at 9 53 05 PM"
src="https://github.com/user-attachments/assets/254a1fde-1bfb-4009-baf4-f808aef51084"
/>
--
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]