jedcunningham opened a new pull request, #70892:
URL: https://github.com/apache/airflow/pull/70892

   The dashboard counted each state separately with a limit of 1000, so any 
busy state showed "1000+" instead of a real number. On a large install almost 
every state sat at the cap, leaving the panel with no usable figures at all.
   
   Count the window in a single scan instead. When it fits, every count is 
exact. When it does not, report what was read as a lower bound, rounded down, 
which stays closer to the real volume than a fixed cap. Dag runs and task 
instances are judged separately, since a window often holds few enough dag runs 
to count exactly while holding far too many task instances.
   
   Counting a bounded number of rows is also cheaper than the old per-state 
limits, which scanned the whole window for any state that could not fill its 
own limit (postgres, 12M task instances):
   
   | window | before | after |
   | --- | --- | --- |
   | 15min | 15 ms | 4 ms |
   | 24h | 3,270 ms | 45 ms |
   | 7d | 20,752 ms | 46 ms |
   
   MySQL and SQLite behave the same way.
   
   The Dags list keeps its previous capped counts and now owns that constant.
   
   Exercised against a running Airflow holding 140k dag runs / 420k task 
instances.
   
   A 12-hour window reports both groups exactly:
   <img width="1098" height="868" alt="Screenshot 2026-07-31 at 2 41 23 PM" 
src="https://github.com/user-attachments/assets/4a25d0bb-b260-49b4-9675-51076b31fe8c";
 />
   
   A 24-hour window reports exact dag runs beside bounded task instances:
   <img width="1100" height="862" alt="Screenshot 2026-07-31 at 2 41 33 PM" 
src="https://github.com/user-attachments/assets/d48019fd-ae8a-418a-ae2b-c4cdc0186a44";
 />
   
   And a 7-day window bounds both:
   <img width="1089" height="864" alt="Screenshot 2026-07-31 at 2 41 41 PM" 
src="https://github.com/user-attachments/assets/7312a7a4-b698-4061-8745-5e07266f9d30";
 />
   
   Percentages are hidden and the bar fills whenever a group is bounded, since 
the proportion is unknown.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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