Fix low-disk alert re-firing every cooldown for standing full volumes (#754)#1127
Merged
Conversation
…#754) The Volume Free Space alert treated free space as a level: while a volume stayed below threshold it re-fired every AlertCooldownMinutes (default 5) in both apps. Each cycle also wrote a fresh Alert-History row, so dismissing the alert appeared broken -- the dismissed row was replaced by an identical, newer one on the next cycle. Add a shared LowDiskAlertGate (PerformanceMonitor.Notifications) that fires only on a fresh breach or one that has worsened >= 1 percentage point of free space below the last-alerted level, and clear the per-server watermark when the volume recovers. Mirrors the failed-job watermark and the #1091 RollingCountAlertGate edge trigger. Wired identically into Dashboard and Lite. Covered by LowDiskAlertGateTests (9 cases). Both apps build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
erikdarlingdata
added a commit
that referenced
this pull request
Jun 16, 2026
…749) The per-server tab badge was driven only by blocking/deadlock/CPU/memory, so a server whose only problem was a full volume or a failed Agent job showed no tab indicator -- the alert surfaced only as a one-shot tray toast and an Alert-History row. Both apps now fold the alert engine's active low-disk / failed-job state into the badge: it lights while the condition is active, auto-clears when the disk recovers or the failure ages out, and acknowledges/silences like the other badges. Persistent-indicator complement to the low-disk re-fire fix (#1127). Dashboard: HasLowDiskAlert/HasFailedJobAlert on ServerHealthStatus, injected in the UpdateTabBadge choke point from _activeLowDiskAlert/_activeFailedJobAlert, folded into HasAnyAlertCondition + the acknowledge AlertBaseline. Lite: its badge is fed by the blocking/deadlock tab refresh, a separate path from the alert sweep -- which use different server identities (GUID for tabs vs int DuckDB id for the sweep). The sweep resolves the ServerConnection via the existing deterministic-hash bridge, sets GUID-keyed badge flags, and re-renders via RefreshServerBadgeExtras with the last-known counts; UpdateAlertCounts ORs the two flags. Covered by AlertBadgeConditionTests (5 cases). Both apps build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The Volume Free Space alert treated free space as a level: while a volume stayed below threshold it re-fired every
AlertCooldownMinutes(default 5) in both apps. Beyond the repeated tray/email, each cycle wrote a fresh Alert-History row — so dismissing the alert appeared broken, because the dismissed row was immediately replaced by an identical, newer one. (Reported live: SQL2019 "T drive full" alert that wouldn't stay dismissed.)The failed-job alert already avoids this with a watermark; low-disk never got the equivalent.
Fix
LowDiskAlertGate(PerformanceMonitor.Notifications): fires only on a fresh breach or one that worsened ≥ 1 percentage point of free space below the last-alerted level._lastAlertedLowDiskPercent) captured on alert, cleared on resolve — wired identically into Dashboard and Lite (MainWindow.xaml.cs).RollingCountAlertGateedge trigger.Verification
LowDiskAlertGateTests— 9 cases (fresh / unchanged / jitter / at-margin / beyond-margin / custom margin). 9/9 pass.🤖 Generated with Claude Code