Repository navigation
Add authored Poison Wait alert-notebook template (#4223) - #4424
Merged
Merged
Conversation
Poison Wait's firing context now carries the wait type as structured data (AlertContext.WaitType, set at both engines' fire sites), and Poison Wait gets its own authored notebook template instead of the mechanical read-list fallback: header/status, both engines' top-waits reads, waiting tasks, the resource-semaphore and memory-grant reads gated on the firing wait type, a wait-time timeline, and a wait trend bound to the exact wait type (or a note when none is known). Refs #4223.
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.
Refs #4223.
Why
Poison Wait's alert-notebook link fell back to the mechanical read-list conversion instead of an authored, forensic layout, and its wait type (THREADPOOL, RESOURCE_SEMAPHORE, ...) lived only in prose (the detail heading /
detail_text), not as data a template could branch on.What changes
AlertContextgains aWaitTypemember, persisted as a trailing/nullable field onAlertContextDto(same backward-compatible shape asRoute/Routing) with aTryReadWaitTypereader. Both engines' Poison Wait fire sites set it: SQL Server'sAlertEngine.CheckPoisonWaitsAsync(the worst-graded finding'sWaitType) and PostgreSQL'sDarlingWorker.EvaluatePgPoisonWaitAsync(finding.Subject) — the same value each engine's mute context already keys on.AlertNotebookEndpoint.Templates.PoisonWait.csregistersauthored/poison-waitfor the"Poison Wait"metric (both engines).s_authoredTemplates, kept sorted.Cell list (RESOURCE_SEMAPHORE firing):
get_wait_statsget_pg_wait_statsget_waiting_tasksget_resource_semaphoreget_memory_grantswait_stats/wait_time_ms(sum), filtered to the wait type when knownget_wait_trendTest plan
New
Darling/Darling.Tests/AlertNotebookTemplatePoisonWaitTests.cs(13 facts/theories): routing, RESOURCE_SEMAPHORE gate (present + absent, case-insensitive),get_wait_trend'swait_typeequals the row's exactly, the no-wait-type degrade (omits trend, adds a note, same cell count),ValidateNotebookDefinitionpasses both with and without a wait type, and the context-serializer round-trip (WaitTypepersists and rehydrates; legacy JSON with no member reads null).RED on dev:
AuthoredTemplate_PoisonWait_IsNotNullfails today because"Poison Wait"has no registered row (AuthoredTemplatereturns null).GREEN:
dotnet Darling.Tests.dll -class Darling.Tests.AlertNotebookTemplatePoisonWaitTests -class Darling.Tests.AlertNotebookAuthoredTemplateTests -class Darling.Tests.AlertNotebookEndpointTests -class Darling.Tests.DocCommentHygieneTestson macOS: Total 159, Failed 0.Both test projects build clean:
Darling.TestsandLite.Testsat 0 errors (-p:EnableWindowsTargeting=true).Lite.Tests/Darling.Teststhemselves are Windows-only and were not run beyond the in-process class list above; CI decides the rest. Full suite was not run given the time budget — the class list above covers everything the family's shared theories and this PR's own file touch.CHANGELOG entry
SECTION: Added
ENTRY:
REF:
[Add authored Poison Wait alert-notebook template (#4223) #4424]: Add authored Poison Wait alert-notebook template (#4223) #4424