-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Description
Read sessions following live updates (i.e., caught up to the stream tail with wait=∞) are terminated with StreamerMissingInActionError (503 Unavailable) after 60 seconds of no appends to the stream. This contradicts the documented behavior that unbounded sessions will "follow in real-time for new records" indefinitely.
Reproduce
- Create a stream and append some records
- Start a read session with no bounds (default
wait=∞) — e.g., via SSE or SDKreadSession( { start: { seqNum: 0 }, }(according to the docs, this should be a session without bounds: https://s2.dev/docs/api/records/read#follow-live-updates) - Wait 60+ seconds without appending any records
- Observe the read session terminate with:
S2Error: {"code":"unavailable","message":"streamer missing in action"} (status 503)
Expected Behavior
An unbounded read session following live updates should remain open indefinitely (or until the client disconnects), as documented:
Once the stream tail is reached, sessions follow real-time for new records if no bounds apply or wait is non-zero.
Actual Behavior
The session is dropped after ~60 seconds of stream inactivity with a 503 Unavailable error.
Notes
This seems to be caused somewhere here:
s2/lite/src/backend/streamer.rs
Line 47 in 4391e9e
| const DORMANT_TIMEOUT: Duration = Duration::from_secs(60); |