Files
seaweedFS/weed/util
Chris Lu 38e14a867b fix: cancel volume server requests on client disconnect during S3 downloads (#8373)
* fix: cancel volume server requests on client disconnect during S3 downloads

- Use http.NewRequestWithContext in ReadUrlAsStream so in-flight volume
  server requests are properly aborted when the client disconnects and
  the request context is canceled
- Distinguish context-canceled errors (client disconnect, expected) from
  real server errors in streamFromVolumeServers; log at V(3) instead of
  ERROR to reduce noise from client-side disconnects (e.g. Nginx upstream
  timeout, browser cancel, curl --max-time)

Fixes: streamFromVolumeServers: streamFn failed...context canceled"

* fixup: separate Canceled/DeadlineExceeded log severity in streamFromVolumeServers

- context.Canceled → V(3) Infof "client disconnected" (expected, no noise)
- context.DeadlineExceeded → Warningf "server-side deadline exceeded" (unexpected, needs attention)
- all other errors → Errorf (unchanged)"
2026-02-18 17:14:54 -08:00
..
2023-11-26 11:47:20 -08:00
2019-11-17 11:40:36 +08:00
2026-02-16 17:01:19 -08:00
2021-04-27 10:37:24 +08:00
2024-08-07 10:42:00 -07:00
2021-08-20 18:38:18 +08:00
2025-10-31 12:49:04 -07:00
2025-06-03 22:46:10 -07:00
2025-06-03 22:46:10 -07:00
2021-09-01 02:45:42 -07:00
2021-09-01 02:45:42 -07:00
2022-09-25 17:43:42 -07:00
2022-09-25 13:34:55 -07:00
2023-09-21 23:51:32 -07:00
2021-04-27 10:37:24 +08:00
2024-10-31 08:40:05 -07:00