Repository navigation
fix(log-stream): replace an overdue alarm instead of trusting it - #260
Merged
Merged
Conversation
Rolling prod back and forward on 2026-10-20 left the feed silent, with no alarm invocations afterwards. Whether or not that rollback restarted the object, a stored alarm that is well past due and never fires would keep getAlarm() non-null, and ensureAlarm would never re-arm. Treat an alarm more than ten emit intervals overdue as dead and overwrite it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Claude finished @alukach's task in 16s —— View job ✅ No blocking issues — safe to merge. I read
Simplify (ponytail)
💰 Estimated review cost: $0.10 · 0m16s · 5 turns |
|
🚀 Latest commit deployed to https://source-data-proxy-pr-260.source-coop.workers.dev
|
alukach
marked this pull request as ready for review
October 20, 2026 19:08
alukach
pushed a commit
that referenced
this pull request
Oct 20, 2026
🤖 I have created a release *beep* *boop* --- ## [2.5.1](v2.5.0...v2.5.1) (2026-10-20) ### Bug Fixes * **log-stream:** replace an overdue alarm instead of trusting it ([#260](#260)) ([a12589a](a12589a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: source-release-bot[bot] <265100246+source-release-bot[bot]@users.noreply.github.com>
This branch was successfully deployed
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.
Follow-up to #257. That PR made storage the only record of a pending tick alarm, re-arming when
getAlarm()returnsnull. This covers the other way the alarm can be stuck: storage still holds an alarm, but it is long past due and never fires. ThengetAlarm()stays non-null,ensureAlarmnever re-arms, and the globe stays silent even after a restart clears in-memory state.The evidence for that case: on 2026-10-20 production was rolled back to
b0af0f99and forward to912faa3fabout 40 seconds apart, and Durable Object analytics show no alarm invocation since (as of 17:10 UTC); a freshwss://logs.source.coop/wsstill receives nothing. No invocation was recorded onb0af0f99and the open WebSockets weren't dropped, so the object may simply never have restarted — which is why this is a guard rather than a confirmed diagnosis.ensureAlarmnow treats an alarm more than ten emit intervals (5s at the productionEMIT_INTERVAL_MS) overdue as dead and overwrites it withsetAlarm. A healthy alarm is never more than one interval out, so the guard costs nothing in normal operation.Shipping this in the same release as #257 means one release resolves production whichever way the alarm is stuck.
Testing
tsc --noEmitpasses;node --test src/aggregate.test.mjspasses 3/3; the pre-push hook's Rust suite passes.wss://logs.source.coop/wsand expecttickframes within a second, and confirmalarminvocations resume in the Durable Object analytics forpublic-log-stream.No ADR covers the log stream's internals; nothing to update in
adrs/.🤖 Generated with Claude Code