Repository navigation
DESKTOP: the Query Store Clutter panel and the Memory Pressure Events chart say where their data starts (part of #4966) - #5022
Merged
Conversation
… Events chart say where their data starts (#4966) A range that reaches before the server's coverage now shows the same 'Showing since' note the other server-tab grids show. The Query Store Clutter panel probes query_store_stats (the coverage rule). The Memory Pressure Events chart probes sample_time through a named source whose edge is the purge cutoff, never the oldest event, so a quiet week with one event at its end names nothing, and it names the earlier of the coverage and the earliest event drawn. Both take the window start the load worked out once; a window of 90 minutes or less makes no probe call, and a failed probe shows no note and keeps the rows.
… its two ranged sources, the plan churn's and the read cost's (part of #4966) The panel draws its plan churn from query_store_stats and its read cost from the collection log, so the note now probes both and names the later start, which is true of every column the panel shows. A source that comes back alone is named, neither gives no note, and a probe that throws costs the note and never the panel. The doc comments now name both sources.
…ore collector's runs, and the Clutter and Memory loads watch their data-start check when the main read fails (part of #4966) The read cost behind the Clutter note is the Query Store collector's runs, not every collector's: a server that logged only other collectors' runs got a 'Showing since' note above an empty panel, and another collector's earlier runs could pull the note earlier. The shared check gets a source for one collector's runs, named from the constant the panel's read-cost query binds. A load whose main read throws never awaited its data-start check, so a later failure of that check was logged as an unobserved Error; both loads now hand the check to the warning path. The Clutter load declares its two reads in flight. The Memory Pressure Events check pairs its sample-time bound with the chart's collection-time floor. The live test class runs on the hypertable path. The Clutter banner comment now names both sources.
erikdarlingdata
marked this pull request as ready for review
October 3, 2026 16:52
erikdarlingdata
added a commit
that referenced
this pull request
Oct 3, 2026
…iled is logged as a warning, not an Error (#5034) Many Darling viewer tab loads start a "where does the data start" probe beside the tab's main read and await it only at the banner step, after the read. When the read threw, the probe was never awaited, and a probe that failed later reached App.OnUnobservedTaskException and was logged as an Error, beside the read's own error the tab already showed. Those loads now await their read through AwaitReadWatchingProbeAsync (#5022), which, when the read throws, hands the probe to DataStartAnswerAsync so a probe failure is logged as a warning, then rethrows the read's error. A read that succeeds leaves the probe to the banner step as before. 31 sites are routed: Active Queries, Blocking (Current Waits, Blocked Process Reports and Deadlocks loads and slicers), Long Queries, Query Store Regressions, Plan Corrections, Query Heatmap, System Events, Collection Health, Config Changes, the Collection Log drill window, and the Queries tab's Top Queries, Top Procedures and Query Store loads and slicers. The helper's body moves to ViewerProbeWatch so the drill window can use it. The Current Waits load now releases its read width at its join. ViewerProbeWatchCensusTests fails any viewer method that starts a DataStart or WindowFloor probe and awaits a read bare, on comment-stripped source, checking every probe per method. Later probe sites must use the helper. Six existing source pins accept the routed form and still check their rules, and the viewer fan-out census bounds its exclusion to the owning method. No change on screen.
This was referenced Oct 8, 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.
Part of #4966.
What changes
The desktop viewer's Query Store Clutter panel and Memory Pressure Events chart now say where their data starts when the range reaches before it. They show the same "Showing since " note the other server-tab grids show. The time is to the second, in the viewer's display zone, the zone the panel's own time columns use.
Query Store Clutter
Files:
ViewerServerTab.QueryStoreClutter.cs,ViewerDataService.QueryStoreClutter.cs, and the banner inViewerServerTab.xaml.query_store_stats. The read cost comes from the collection log (the runs of thequery_storecollector). Its config and memory-clerk sections show the newest snapshot only, so they need no note.GetQueryStoreClutterDataStartAsyncasks both sources through the sharedDataWindowFloor(ForCollectorTable("query_store_stats")andForCollectionLog()). It names the later of the two starts, so the note is true of every column the panel shows. A source that comes back alone is named, and when neither does there is no note. A covered range with a quiet start shows no note.GetForServerAsynctakes a single source. The shared probe's several-source form (GetAsync) answers the earliest start among its sources. That is the right rule for the two halves of a stitched rollup, and the opposite of this panel's.LaterStartAsyncruns the two probes in turn and keeps the later start. A probe that throws makes the whole answer throw, so the tab's guard drops the note and the panel loads without it. A first probe that failed starts no second.LoadQueryStoreClutterAsyncstarts the probe beside the read, both with the window start the caller worked out once. It raises the banner through a newShowQueryStoreClutterDataStartAsync, which is the sharedUpdateTruncationBannerplusDataStartOrNullAsync, so a probe that throws costs only the note.Memory Pressure Events chart
Files:
ViewerServerTab.Memory.cs,ViewerDataService.Memory.cs,DataWindowFloor.cs, and the banner inViewerServerTab.xaml.DataWindowFloor.Source.ForMemoryPressureEvents(), besideForCollectionLog(). It probessample_timewith the collector namememory_pressure_events.TryForCollectorTable("memory_pressure_events")still returns false, because its index is(server_id, sample_time), not its prefix time column. A test pins that.TimescaleSupport.RawRelationsnorDarlingRetentionHorizons.BaselineServingRawCollectors, so the schedule's horizon applies as written (the purge cuts oncollection_time). A test fails if the table ever joins either list.GetMemoryPressureEventsDataStartAsync. It starts beside the six reads inside the fan-out scope, whose declared width is now 7. It stays out of the join, so a probe that throws costs the note and not the chart.PressureRowsDrawn, the indicator >= 2 rows, with no row cap). It goes through the existingShowEventDataStartAsync.RenderMemoryPressureEventsCharttakes the load's window instead of working out a second one, so the read, the probe, the axis and the note share one start.GetForServerAsyncskips it, once per source on the clutter panel.Test plan
Wiring pins, RED on the old code: 10 of 12 fail before the change. They cover:
The 2 that pass before are guards. The generic factory still refuses
memory_pressure_events, and the table is in neither no-schedule-edge list. The clutter probe pin now also requires both sources and the later-start choice. It wants oneGetForServerAsynccall for each, from the window's start, and no use of the several-sourceGetAsync. It fails on a one-source probe.Banner and probe behavior (
ViewerClutterAndMemoryPressureDataStartTests, 20 cases):Live against a store (
ViewerClutterAndMemoryPressureDataStartLiveTests, 8 cases):RED on the one-source probe (the branch before this change), live. The log-starting-later case names the table's start (expected 3 days before the range's end, got 6 days before it). The log-only server names nothing (expected 3 days before the range's end, got none). The other new live cases hold before and after, because they pin the rule's other half.
In the quiet-start case, the server with no rows now answers the log's own 60-day horizon, the later of the two. Before, it answered its first collection, 120 days back. Both are before the range, so it still names nothing.
RED on the oldest-row shape. The named source was changed to walk to the oldest event. Then 3 tests fail: the quiet-week live test, the range-past-coverage live test, and the named-source pin. Restored, all pass.
Targeted classes without a store: 577 total, 0 failed, 60 skipped (the live ones).
Same classes live: 577 total, 0 failed, 0 skipped. The three new classes,
RepoFileAdoptionTests,DocCommentHygieneTestsandCommentFilterAdoptionTestsran again on the final build: 123 total, 0 failed, 0 skipped.The classes run:
DataWindowFloor*,QueryStoreClutter*,RawWindowFloor*,ComposeDataFloorLiveTestsandEffectiveStartUtcTestsViewerDataStartBannerTests,ViewerEventCapDataStartLiveTests,ViewerEventDataStartTests,ViewerLongQueriesDataStartTests,ViewerPlanCorrectionsDataStartTests,ViewerQueryHeatmapDataStartTests,ViewerQueryStoreRegressionsDataStartTests,ViewerShortWindowDataStartTests,ViewerSystemEventsDataStart*,WebDataStartNoteTestsViewerGridTimeColumnSortMemberTests,ViewerGridTimeTextZoneTestsandQsCaptureModeRouteKnobToast*RepoFileAdoptionTests,DocCommentHygieneTestsandCommentFilterAdoptionTests.Darling.Tests builds with 0 warnings and 0 errors.
Full suite not run.
The desktop viewer was not started. The banners are checked through the same steps the tabs call, on real banner controls.
Notes
sample_timehas nocollection_timebound. So it visits each chunk in the retention window once, about 30 index descents. That is cheap at this table's size, and the chart's own read has the bound.CHANGELOG
No entry in this PR. The release owner adds it under [Unreleased].
Proposed entry:
Later fixes
Test plan