You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e5621f9
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(relay): close a REQ whose history read failed instead of sending EOSE
A REQ whose history query failed with anything other than a statement
timeout ended with EOSE. EOSE tells the client it has every stored match,
so a client resuming from its live point skips the history that failed.
Send CLOSED "error: database error" instead, retiring the subscription
the same way the timeout path does, and reuse that one reason string
for the handler's existing pre-registration DB failures and COUNT.
Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Luke Tornquist <[email protected]>
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,7 +378,7 @@ This prevents a race where a non-member receives live fan-out events from a priv
378
378
379
379
### Historical Query (EOSE)
380
380
381
-
After registering, the REQ handler queries Postgres for stored events matching the filters (up to 500 per filter, hard cap). These are sent as `["EVENT", sub_id, event]` frames before `["EOSE", sub_id]`. New events arriving after EOSE are delivered via the fan-out path.
381
+
After registering, the REQ handler queries Postgres for stored events matching the filters (up to 500 per filter, hard cap). These are sent as `["EVENT", sub_id, event]` frames before `["EOSE", sub_id]`. New events arriving after EOSE are delivered via the fan-out path. EOSE means every stored match was sent, so a failed history read never ends in EOSE: it retires the subscription with `["CLOSED", sub_id, "error: query timed out"]` for a statement timeout or `"error: database error"` for anything else.
382
382
383
383
**Client consumption invariant.** A client rebuilding channel state must
384
384
open its live subscription before (or overlapping) the finite history
0 commit comments