Skip to content

fix(s3): treat any 2xx as success in store_request#430

Open
tpjg wants to merge 3 commits into
jamsocket:mainfrom
tpjg:fix-s3-204-success
Open

fix(s3): treat any 2xx as success in store_request#430
tpjg wants to merge 3 commits into
jamsocket:mainfrom
tpjg:fix-s3-204-success

Conversation

@tpjg

@tpjg tpjg commented Jun 3, 2026

Copy link
Copy Markdown

A successful S3 DELETE returns 204 No Content, not 200. The previous match only accepted StatusCode::OK, so every successful delete fell through to the catch-all arm and was misreported as a ConnectionError ("Received 204 No Content from S3-compatible API."). Accept any 2xx.

Timo Gatsonides added 3 commits June 3, 2026 09:49
A successful S3 DELETE returns 204 No Content, not 200. The previous
match only accepted StatusCode::OK, so every successful delete fell
through to the catch-all arm and was misreported as a ConnectionError
("Received 204 No Content from S3-compatible API."). Accept any 2xx.
…unded growth

Awareness::remove_state removed the client from `states` but
update_meta left a permanent entry in `meta`. On a long-lived
server-side Awareness (one per loaded document), this grows by one
entry for every client session that ever connected - a slow,
unbounded memory leak on documents that never go idle.

remove_state now also prunes meta entries that have no corresponding
state and were last touched more than 30s ago (the y-protocols
outdatedTimeout convention). The grace window preserves the clock
check that rejects stale updates from a just-disconnected client.

Uses time::OffsetDateTime rather than std::time::Instant because
y-sweet-worker compiles this crate to wasm32, where Instant::now
panics.
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