Commit Graph
4 Commits
Author SHA1 Message Date
Chris LuandClaude Opus 5.5 a5e52b68f1 server, filer, s3: log downloads the client hung up on below error level (#12991)
* server: log a response the client hung up on below error level

A client that closes a download early (a video player seeking, a browser
cancel) fails the next response write with a broken pipe, a connection
reset, or an HTTP/2 stream close, and ProcessRangeRequest logged each one
as an ERROR. net/http cancels the request context once a write to the
client fails, so a canceled context now logs at V(3); a failure under a
live request still logs as an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* filer: log a stream the client hung up on below error level

The filer logged "failed to stream content" as an ERROR for every
download a client closed early, next to ProcessRangeRequest's own line.
It now goes through the same check, so only a failure under a live
request reaches the error log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3: log a GET the client hung up on below error level

A client closing a download early made GetObject log two ERROR lines,
from streamFromVolumeServers and from GetObjectHandler, and the SSE copy
paths logged a third. The write fails with a broken pipe or connection
reset rather than context.Canceled, so the canceled-stream check missed
it. net/http cancels the request context once a write to the client
fails, so streamCanceled also treats a canceled request as the client
leaving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* filer: log a canceled chunk read below error level

A ranged S3 GET reads through ChunkReadAt with the request context, so a
client hanging up cancels the chunk fetch and the reader logged
"fetching chunk ...: context canceled" (and, when the lookup was the
step canceled, "operation LookupFileId ... failed") as an ERROR. A read
whose caller canceled it now logs at V(3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 13:12:03 -08:00
Konstantin Adzer 91eaabf371 s3: answer ClientDisconnected for a GET the client aborted before the first byte (#12707)
* s3: answer ClientDisconnected for a GET the client aborted before the first byte

Fixes #12706

* s3: tell a gone client on TLS and HTTP/2 too, and not on a connection the server closed
2026-11-17 17:15:00 -08:00
000baf8dfa s3: return an error for GETs canceled before the first byte (#12502)
* s3: answer GETs canceled before the first byte

A stream that fails before writing anything now always gets an S3 error
response, canceled errors included. The idle timeout and a shared lookup
canceled by another request both cancel the request context while the
client is still connected, and returning silently sent that client a
200 with Content-Length: 0. A client that has gone away never sees the
write.

Refs #12500

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3: mark inline GET write errors as written; bound the idle-cancel test

An inline object's write error comes after the status line, so the
caller must not write an S3 error on top of it. The idle-cancel test
caps the client wait and gives the response write its own deadline,
keeping only the read side on the 200 ms idle timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3: test a GET whose request is canceled before the first byte

Drives GetObjectHandler through a chunk lookup that cancels the request
context, so a handler that returns before answering shows up as the empty
200 again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3: check the cancel test reached the chunk lookup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
2026-11-11 08:45:20 -08:00
msementsovandChris Lu 4c13a9ce65 Client disconnects create context cancelled errors, 500x errors and Filer lookup failures (#8845)
* Update stream.go

Client disconnects create context cancelled errors and Filer lookup failures

* s3api: handle canceled stream requests cleanly

* s3api: address canceled streaming review feedback

---------

Co-authored-by: Chris Lu <chris.lu@gmail.com>
2026-03-30 12:11:30 -07:00