Repository navigation
Report nothing pending for a disabled alert - #38279
Merged
Merged
Conversation
Contributor
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
6 tasks done
Code Review ✅ Approved 🟡 Medium riskTreating disabled alerts as having no pending events changes diagnostics and counts, so clients may stop seeing backlog while alerts are off. Disabled alerts now report as not running, with nothing pending or unread and their stored offsets still visible in diagnostics, so enabling them later sends only new events. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
This was referenced Nov 20, 2026
yan-3005
approved these changes
Nov 24, 2026
manerow
added a commit
that referenced
this pull request
Nov 24, 2026
…port 2.1 #38279) (#38555) * Report nothing pending for a disabled alert * Cover alerts created disabled with a position an older release wrote * Share the read-nothing progress and test the no-row read * Keep the raw alert offset getter Collate tests read * Say a disabled alert is not running and report its stored offsets
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.
Describe your changes:
Fixes #38280
Problem. A disabled alert has no job, so its saved position never moves. When it is enabled again the backlog is skipped (
skipBacklog), so events from the time it was off are never sent. But while it stayed off, every reader of "what is unread" counted from the saved position: "500+" pending on its page, unprocessed events in its diagnostics, a growing lag, andprocessedEventsfalse. None of it would ever be sent.A disabled alert gets such a row in two ways:
One customer alert of the second kind was 78k events behind; opening its page ran the server out of memory before the 500 cap.
Fix. A disabled alert is now reported as not running. Every one of these readers goes through
AlertProgress.of, which for a disabled alert reports nothing pending or unread and "processed all events" true, since enabling it starts from the latest event. Diagnostics still show the real storedcurrentOffsetandstartingOffset, because support needs them. What it delivered or failed before is still counted. The row is not touched, and enabling still callsskipBacklog, so only new events are sent.So that a disabled alert does not look like a healthy idle one,
eventsRecordanddiagnosticInfonow returnenabled, the same field the alert and/schedulingalready carry. The change is additive: counts stay numbers, and no new status value is added. The schema descriptions now say pending means events the alert will still process.Why this design.
enabledflag on every read. Alerts already disabled today are fixed with no migration, whichever way their row was written.skipBacklogwrite one.The rule is recorded in
docs/decisions/2026-11-19-a-disabled-alert-has-nothing-pending.md.Known gap. Between the save that enables an alert and its
skipBacklog, a reader can briefly see the old backlog. The 500 cap bounds the cost.Type of change:
High-level design:
N/A, small change.
Tests:
Use cases covered
enabled: falseand nothing pending oneventsRecord,diagnosticInfo,schedulingandprocessedEvents, and its stored offsets in diagnostics.enabled: trueand its stored offsets.Unit tests
AlertProgressTest(new): a disabled alert has nothing pending, never counts or lists change events, reports where it stopped and keeps what it handled. An enabled alert still reads from its position.Backend integration tests
AlertDeliveryIT: both shapes above, end to end over REST, then enabling and delivering.Local Java test run: PASSED
376aaa1ef254(baseorigin/main)--scope full).Playwright (UI) tests
Not applicable, no UI change.
Manual testing performed
None beyond the tests above.
UI screen recording:
Not applicable, backend only.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md.docs/decisions/.

Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
Disabled alerts report nothing pending while diagnostics keep their stored offsets.
Reviews (9) · Last reviewed commit: "Say a disabled alert is not running and ..." · Reviewed by Greptile