Repository navigation
Journal: streams learn of changes from the shared poll alone, not database notifications - #114
Merged
Merged
Conversation
…abase notifications #105 sent pg_notify with every journal write and partial reply. A transaction that sends one takes a lock on the whole Postgres server as it commits, so every commit on the server waited its turn (16 writers: 348 appends/s with notifications, 394 without; worse as writers grow), and behind a pooler in transaction mode the listening connection would silently hear nothing. Writes no longer notify, and the watch has no listening connection: its shared poll runs every 150 ms (one small query per process, whatever the number of streams), a starting stream is told at once, and a session's end is seen within a round instead of within 2 s. The journal package's docstring now says what each module is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ge2HHQ32aPUxZf3EnfAfpt
PALBIBEK
pushed a commit
that referenced
this pull request
Nov 4, 2026
…ion ended The badge shows Ended when the event stream ends, but the composer waited for the status fetched after it: for a moment a person could type into an ended session, and the chat journey's check right after End caught it (since #114 the stream learns of the end within 150 ms, often before End's own response lands). The composer now blocks on the stream's end too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ge2HHQ32aPUxZf3EnfAfpt
PALBIBEK
added a commit
that referenced
this pull request
Nov 4, 2026
…ion ended (#123) The badge shows Ended when the event stream ends, but the composer waited for the status fetched after it: for a moment a person could type into an ended session, and the chat journey's check right after End caught it (since #114 the stream learns of the end within 150 ms, often before End's own response lands). The composer now blocks on the stream's end too. Claude-Session: https://claude.ai/code/session_01Ge2HHQ32aPUxZf3EnfAfpt Co-authored-by: Claude <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.
#105 sent pg_notify with every journal write and partial reply. A transaction that
sends one takes a lock on the whole Postgres server as it commits, so every commit on
the server waited its turn (16 writers: 348 appends/s with notifications, 394
without; worse as writers grow), and behind a pooler in transaction mode the
listening connection would silently hear nothing. Writes no longer notify, and the
watch has no listening connection: its shared poll runs every 150 ms (one small
query per process, whatever the number of streams), a starting stream is told at
once, and a session's end is seen within a round instead of within 2 s. The journal
package's docstring now says what each module is.
Journal gaps, PR 3 of 6.
Tests
SUPERVISOR_TEST_PG_URL); ruff and mypy are clean.journal-blob-refs): lint and types, tests, backend, frontend, e2e, compose smoke, journeys.Generated by Claude Code