Skip to content

fix: bound the live queue and clean up failed subscriber registrations - #1407

Merged
dunglas merged 3 commits into
mainfrom
fix/subscriber-leaks
Sep 24, 2026
Merged

dunglas merged 3 commits into
mainfrom
fix/subscriber-leaks

Conversation

@dunglas

@dunglas dunglas commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Changes

  • The live queue of a subscriber that is not ready yet is bounded. During a long history replay every matching live update was queued without limit, although Ready drops a queue that no longer fits in the out channel.
  • A subscriber is removed when its registration fails: a transport that added it before failing kept it listed forever.
  • The AddSubscriber contract states that HistoryDispatched must be called for an empty Last-Event-ID too; a transport skipping it hangs the request forever.

During a long history replay every matching live update was queued without
limit, although Ready drops a queue that no longer fits in the out channel.
A transport that added the subscriber before failing kept it listed forever.
A transport skipping it for an empty Last-Event-ID hangs the request forever.
@dunglas
dunglas force-pushed the fix/subscriber-leaks branch from 12019a1 to 9d632b0 Compare September 24, 2026 09:54
@dunglas
dunglas merged commit 039ba25 into main Sep 24, 2026
46 checks passed
@dunglas
dunglas deleted the fix/subscriber-leaks branch September 24, 2026 10:01
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