Skip to content

Fix low-disk alert re-firing every cooldown for standing full volumes (#754)#1127

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/754-low-disk-rerecord
Jun 16, 2026
Merged

Fix low-disk alert re-firing every cooldown for standing full volumes (#754)#1127
erikdarlingdata merged 1 commit into
devfrom
fix/754-low-disk-rerecord

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

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

  • New shared LowDiskAlertGate (PerformanceMonitor.Notifications): fires only on a fresh breach or one that worsened ≥ 1 percentage point of free space below the last-alerted level.
  • Per-server watermark (_lastAlertedLowDiskPercent) captured on alert, cleared on resolve — wired identically into Dashboard and Lite (MainWindow.xaml.cs).
  • Mirrors the failed-job watermark and the [[BUG] Deadlock alerts re‑fire on the rolling 1‑hour count every cooldown #1091] RollingCountAlertGate edge trigger.

Verification

  • LowDiskAlertGateTests — 9 cases (fresh / unchanged / jitter / at-margin / beyond-margin / custom margin). 9/9 pass.
  • Dashboard + Lite both build clean.

🤖 Generated with Claude Code

…#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 erikdarlingdata merged commit 569ff38 into dev Jun 16, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/754-low-disk-rerecord branch June 16, 2026 15:23
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant