Repository navigation
Serve the Current Waits series (#2484) - #2496
Merged
Merged
Conversation
Second of the #2484 list. get_waiting_tasks returns the snapshot rows and can never say whether now is worse than an hour ago, which is the question that actually decides whether anything is wrong. The tab existed only in the WPF viewer. Both series ship in one payload deliberately. A wait-type spike with no blocked sessions is a resource wait; the same spike with blocked sessions is contention. Split across two tools a caller can fetch one and draw the opposite conclusion, so they are not separable. The empty answer is sharper here than for the collection log, because the WRONG answer is the reassuring one. "Nothing was waiting" reads as an all-clear and a caller who believes it stops looking. A server the collector has never sampled gets "unavailable" and is told outright that this is NOT an all-clear. Three things kept rather than simplified away: The viewer's database filter. Dropping it would have been a smaller signature and a different question: on a busy instance one database usually owns the blocking, and a series that cannot be narrowed to it does not answer what the viewer answers. The wait series stays server-wide, which the test pins, because narrowing both would silently change what the left-hand chart means. Lite's probe reads v_waiting_tasks, not the base table, because every other reader in that file goes through the view. A probe on a different source could report a server as sampled for rows the trend cannot see -- picking the wrong branch in precisely the case it exists to get right. Darling uses the base table throughout, so its probe does too. The web panels go through fanout(), not two line() calls. One read, two panels: the tab must not fetch the same read twice, and here that rule matches the payload's own reason for existing. Ported to Lite in the same change rather than parked on the divergence ratchet; census 102 -> 103 tools, 77 -> 78 shared, Darling-unique unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Review summaryReviewed the Specifics checked:
No SQL Server missing-index recommendations applicable (no T-SQL collector changes in this PR — all reads are against the Postgres/DuckDB store). |
This was referenced Aug 22, 2026
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.
Second item on #2484.
get_waiting_tasksgives the snapshot rows and can never answer "was this worse an hour ago" — which is the question that decides whether anything is actually wrong. The tab existed only in the WPF viewer, so it was invisible to the browser and to any agent.No new collection. Both series read
waiting_tasks, which the snapshot read already exposes row by row.One read, two series, deliberately
A wait-type spike with no blocked sessions is a resource wait. The same spike with them is contention. Split across two tools, a caller can fetch one and draw the opposite conclusion — so they come back in one payload, and the web panels go through
fanout()rather than twoline()calls.The empty answer is sharper here
emptyunavailableFor the collection log the wrong answer was merely unhelpful. Here the wrong answer is the reassuring one: "nothing was waiting" reads as all-clear, and a caller who believes it stops looking. Pinned on both SKUs — same zero rows, and the quiet case must not reach for the word the never-sampled case uses.
Three things kept rather than simplified away
The viewer's database filter. Dropping it would have been a smaller signature and a different question — on a busy instance one database usually owns the blocking. The wait series stays server-wide, and the test pins that, because narrowing both would quietly change what the left-hand chart means.
Lite's probe reads
v_waiting_tasks, not the base table. Every other reader in that file goes through the view; a probe on a different source could report a server as sampled for rows the trend cannot see — the wrong branch in exactly the case the probe exists to get right. Darling uses the base table throughout, so its probe does too.fanout()over twoline()calls. The no-duplicate-fetch pin would have caught it, but the rule and the payload agree here for the same reason.Verification
DarlingCurrentWaitsTrendTests, live store): never-sampled vs quiet-window wording; both series in one payload; aPAGEIOLATCHrow counted as a wait and not as blocked; the database filter narrowing the blocked series while leaving the wait series at full width.CurrentWaitsTrendToolTests, DuckDB fixture): the same three, at the tool level..csfile for stranded doc blocks — the failure mode from Serve the raw collection log (#2484) #2494 — all clean.Ported to Lite in the same change rather than parked on the ratchet: census 102 → 103 tools, 77 → 78 shared, Darling-unique unchanged.
Next on #2484
Blocking Stats. It needs
AggregateDeadlockSeveritymoved out of the Viewer intoCommonfirst — it isinternalthere and parses the deadlock XML — so that move is the substance of its own PR rather than a footnote in this one.