Repository navigation
sp_HealthParser: @warnings_only filters memory broker rows on SHRINK (#941) - #960
Merged
Merged
Conversation
…941) The memory broker section tested the broker notification against RESOURCE_MEMPHYSICAL_LOW, a resource monitor value. A broker notification is STABLE, GROW or SHRINK, so with @warnings_only = 1 no broker row could ever be returned, even when SHRINK events existed. Keep a broker row under @warnings_only = 1 only when the notification is SHRINK. The README row and @help text now say so. The resource monitor filter in the memory conditions section is correct and unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe
erikdarlingdata
marked this pull request as ready for review
November 13, 2026 13:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe
|
Claude finished @erikdarlingdata's task in 10s —— View job ReviewThe change is correct. The broker
I have no blocking issues. I could only compare against the last two commits because |
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.
Fixes the
@warnings_only = 1memory broker filter reported in #941. This is a dev merge, so the issue will not close on its own; the coordinator closes it.What went wrong
In the memory broker section,
sp_HealthParser.sqlfilteredmemory_broker_ring_buffer_recordedevents withvalue[.= "RESOURCE_MEMPHYSICAL_LOW"]. That is a resource monitor value (correct in the memory conditions section, which reads@lastNotification). A brokernotificationisSTABLE,GROWorSHRINK. With@warnings_only = 1no broker row could ever pass, so the proc printed "no memory pressure events found" even whenSHRINKevents existed.The fix
With
@warnings_only = 1, keep a broker row only whennotificationisSHRINK.@warnings_only = 0keeps every row as before. Same expression shape, one string changed:Siblings:
notificationappears in only one filter in the proc (the broker one). TheRESOURCE_MEMPHYSICAL_LOWfilter in the memory conditions section is correct and untouched. The README row and the@helptext for@warnings_onlynow say that memory broker rows count as a warning only when the notification isSHRINK. No version or@version_datechange.Proof
1. Predicate proof (synthetic XML with three
memory_broker_ring_buffer_recordedevents, GROW, STABLE, SHRINK; old and new WHERE predicate; SQL2025):2. Real run on SQL2025's live
system_health(before and after proc installed in a scratch database, since dropped).EXECUTE dbo.sp_HealthParser @what_to_check = 'memory', @start_date = '20200101', @end_date = '20261231', @warnings_only = <0|1>, broker result set rows counted bynotification:This server now holds real SHRINK events (the issue's server had none), so the before run shows the bug directly. The server is live: the after run happened a few minutes later, so its counts are slightly higher than the before run (SHRINK 18,795 in the
@warnings_only = 0run, 18,852 in the= 1run a minute or two after). The after@warnings_only = 1run returns every SHRINK row and nothing else.The edited proc file was also installed and
@help = 1run: it compiles and the new@warnings_onlytext shows.Dropped
Nothing.
Considered, not added
sp_HealthParser; none was created (scratch scripts only, outside the repo).@warnings_onlymeans in other sections.Checks
sp_HealthParser/sp_HealthParser.sqlandsp_HealthParser/README.mdchanged.Install-All/DarlingData.sqluntouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe