Repository navigation
DESKTOP: the Queries tab's floor probes skip a range of 90 minutes or less, and the event-grid live tests run the tab's own banner step (part of #4966) - #5014
Merged
Conversation
… less, and the event-grid live tests run the tab's own banner step (part of #4966) The Query Stats, Procedure Stats and Query Store floor probes queried the store for every range, so a range of 90 minutes or less read it for a note that could not show. Each viewer method now returns null at once for one, as DataWindowFloor.GetForServerAsync does. The skip stays out of RawWindowFloor.GetAsync, which Darling's MCP tools share and read as nothing was read. The two event-grid live test files call ShowEventDataStartAsync on a real banner instead of restating the banner rule.
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
1. The Queries tab's three floor probes skip a range of 90 minutes or less.
GetQueryStatsWindowFloorAsync,GetProcedureStatsWindowFloorAsyncandGetQueryStoreWindowFloorAsync(the viewer's data service) used to query the store for every range, including ranges where no "Showing since" note can show. The probe's answer is at or before the range's end, and the note needs it more than the 90-minute slack after the range's start, so for a range of 90 minutes or less the answer could never raise a note. Each method now returns null at once for one, with the same check and comment asDataWindowFloor.GetForServerAsync(endUtc - startUtc <= DurationTrendRouting.TruncationSlack). Coverage rule is unchanged: the later of the server's first collection and the purge edge.The skip is in these three viewer methods and NOT in
RawWindowFloor.GetAsync. Darling's MCP tools callGetAsynctoo (DarlingDataReader.GetQueryStatsWindowFloorAsyncand its two siblings) and read its null as "nothing was read", so a skip inside it would make a short MCP window report that nothing was read. Each viewer method says so in a comment, andGetAsync's remarks say it too.Caller check: every floor read in
ViewerServerTab.Queries.csgoes through these methods. Three are the tab's loads (LoadTopQueriesAsync,LoadTopProceduresAsync,LoadQueryStoreAsync) and three are the slicer re-reads (OnQueryStatsSlicerChanged,OnProcStatsSlicerChanged,OnQueryStoreSlicerChanged). NoViewerServerTab*.csfile callsRawWindowFloor.GetAsyncitself. A source test counts exactly two calls to each method and none to the shared probe. The banner text is unchanged for these ranges: a null floor and a floor inside the slack both leaveUpdateTruncationBannerwith nothing to name (the hourly-tier suffix and the interval-table plan are independent of the floor).2. The two event-grid live test files run the tab's own step.
ViewerEventDataStartLiveTests.cs(Blocked Process Reports, Deadlocks) andViewerEventGridsDataStartLiveTests.cs(System Events, Default Trace, Long Queries, and the row-cap cases) restated the banner rule in the test: they computed the notice withViewerEventDataStart.Ofand checkedRawWindowFloor.IsTruncated. They now callViewerServerTab.ShowEventDataStartAsyncon a real banner control, through the sharedQueryGridSeed.ReadBannerhelper #4998 added, with the probe's answer and the row cap the tab passes (Blocked Process Reports also passes the capped source's start, as the tab does), and assert on the banner text (Showing since ..., or hidden). Every case and its intent is kept. The classes join theviewer-time-staticscollection, because the banner's time text reads the process-wide display mode. One addition: the Blocked Process Reports full-page case also checks that the rows and the cap alone name the oldest row (with no capped-source start), so the rows-and-cap path stays pinned now that the tab's own call passes both.Test plan
ViewerShortWindowDataStartTestsran 24 tests and 6 failed: each of the three probes at 60 and at 90 minutes (a store nothing listens on, so a probe that starts its query throws). With the skip: 24 of 24 pass. These pass both before and after, as they should: each probe at 91 minutes starts its query and fails (3), a Darling MCP floor read over 60 and over 90 minutes still queries (6), and the caller census (1).ShowEventDataStartAsyncignoring its rows (a temporary change, restored), 14 of the 26 tests in the two files fail:ViewerEventDataStartLiveTests.cs4 of 8,ViewerEventGridsDataStartLiveTests.cs10 of 18 (6 of 12 in the System Events, Default Trace and Long Queries class; 4 of 6 in the row-cap class). The cases that stay green do not depend on the rows: a range that starts inside the coverage, a quiet start, and a read one row under its cap. Restored: 26 of 26 pass against a local PostgreSQL.ViewerShortWindowDataStartTests, the three live classes in the two files, everyViewer*DataStart*class,ViewerDataStartBannerTests,ViewerBlockedProcessReportsCoverageLiveTests, the fiveRawWindowFloor*classes,QueryStoreTopWindowTests,QueryStoreSliceTieBreakSourceTests,CSharpSourceWalkerTests,RepoFileAdoptionTests,DocCommentHygieneTests,CommentFilterAdoptionTests,LivePostgresCollectionHygieneTests: Total 331, Failed 0, Skipped 47 (the live ones).Notes
RefreshWindowTruncatedBannerAsyncinServerTab.Refresh.cs) goes throughProbeWindowFloorOrNullAsync, which returns null at once for a window of 90 minutes or less, so the two apps match.RawWindowFloorMcpLiveTests) still pass and cover that.CHANGELOG
No entry in this PR; the release owner adds it under [Unreleased]. Proposed entry: