[v3-3-test] Show larger dag run and task instance counts on the dashboard (#70892) - #71008
Merged
Merged
Conversation
…oard (#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 far 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 show the same pattern. The Dags list keeps its previous capped counts and now owns that constant. (cherry picked from commit b316afb) Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
1 task
vatsrahul1001
marked this pull request as ready for review
August 4, 2026 11:55
vatsrahul1001
requested review from
bbovenzi,
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
henry3260,
jason810496,
pierrejeambrun,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
August 4, 2026 11:55
vatsrahul1001
pushed a commit
that referenced
this pull request
Aug 5, 2026
…oard (#70892) (#71008) 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 far 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 show the same pattern. The Dags list keeps its previous capped counts and now owns that constant. (cherry picked from commit b316afb) Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 far 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 show the same pattern.
The Dags list keeps its previous capped counts and now owns that constant.
(cherry picked from commit b316afb)
Co-authored-by: Jed Cunningham 66968678+jedcunningham@users.noreply.github.com