Repository navigation
Conversation
A server that rejects a request on its headers (MinIO for an expired multipart upload) answers before reading the body and resets the connection; over TLS that answer was lost and the error was retried as a network error. Bodies of at least `s3_expect_continue_min_body_size` now wait for `100 Continue` and skip the body on a final response.
On `417 Expectation Failed` the request is sent once more without the header, without using up a redirect. Tests cover a server that never sends `100 Continue`, one that sends it late, and one that answers 417.
`Expect: 100-continue` now gets an early error response over HTTP and HTTPS, so the plain-HTTP-only workaround from #124557 (`receiveEarlyResponse`, `receiveEarlyHTTPResponse`) is not needed.
The TLS layer reads with the larger of the receive and send timeouts, so the wait lasted up to the send timeout (30 s); set both. A zero `s3_expect_continue_timeout_ms` waited forever; it now disables the header.
|
Workflow [PR], commit [2e6fda7] Summary: ❌
AI ReviewSummaryAdds Missing context / blind spots
Findings
Tests
Final VerdictStatus: |
A zero socket timeout means no timeout, so the wait would never end. `s3_expect_continue_min_body_size = 0` is the only way to disable the header.
…SCOPE_EXIT_SAFE` Poco `waitForResponseData` now reads with the current socket timeouts; `waitForHTTPContinue` sets both timeouts and restores them in a guard, before the response header is read.
…e loop condition
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units296 translation units recompiled, 2582 s compile time in total, 296 of them have a recent master baseline. |
Drop the early-error-response part (`HTTPClientSession` and `PocoHTTPClient` changes, the `early` mode of the `no_such_upload` mock and its test): the mock action it extends comes from #118829, which is not on 26.9, and #130514 replaces this approach on master with `Expect: 100-continue`. What remains is fe7dab9 (no outer retry of an error the SDK has already retried), the same tree as the resolution proposed and tested by groeneai. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Closing in favor of #130858. Watching the connection while the body is sent (RFC 9112, section 9.5) reports an early error response over HTTP and HTTPS without |
Related: #124326
Related: #124557
ClickHouse sent the whole request body before it read any response. When a server rejects a request on its headers and closes the connection (MinIO for an expired multipart upload), the answer was lost and the error was retried as a network error. #124557 read that early answer, but only over plain HTTP.
Now a body of at least
s3_expect_continue_min_body_size(256 KiB, the size above which Go servers stop draining) waits up tos3_expect_continue_timeout_msfor100 Continue. A final response skips the body,417resends the request without the header, and no answer sends the body. This works over HTTP and HTTPS, so the #124557 workaround is removed. Not checked: how GCS, R2 and proxies answerExpect; a server that never answers costs up to the timeout per upload.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
S3 requests with a body of at least
s3_expect_continue_min_body_sizebytes (256 KiB by default) now sendExpect: 100-continue, so an error that the server sends before it reads the body, such asNoSuchUploadfor an expired multipart upload, is reported over HTTP and HTTPS instead of being retried as a network error. Sets3_expect_continue_min_body_size = 0to disable it.With
compatibilityset to 26.10 or older, the header is off, and the plain-HTTP early-response read from #124557 no longer exists.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/130514]