Repository navigation
Backport #111506 to 26.7: Fix flaky test_s3_table_functions_timeouts - #112589
Merged
clickhouse-gh[bot] merged 1 commit intoJul 30, 2026
Merged
Conversation
The test injects a 1200ms network delay and expects an S3 INSERT to time out and raise. It set no explicit S3 timeout, so raising relied on a default timeout being below 1200ms on the connection path actually taken. On a fresh connection the adaptive connect timeout (500ms first attempt, 1000ms on retries) trips reliably. But when the S3 request reuses a pooled keep-alive connection there is no fresh TCP connect, so the connect timeout does not apply; the only remaining gate is the send/receive idleness timeout, whose default (adaptive 3000ms / configured 30000ms) is far above 1200ms, so the write completes and pytest.raises sees no exception. That is the rare DID NOT RAISE flake (one occurrence in 40 days of CI, zero on master). Make the request timeout the single failure mechanism: disable adaptive timeouts, keep the connect timeout above the delay, and set s3_request_timeout_ms=500. The send/receive idleness timeout applies to every attempt on both fresh and reused connections, so the 1200ms delay always exceeds it and the write times out deterministically. Also assert the raised error is a timeout, so the test cannot pass on an unrelated error. (cherry picked from commit bf0f909)
Contributor
|
Workflow [BackportPR], commit [af6c1d4] Summary: ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #111506 to the
26.7release branch.test_s3_table_functions/test.py::test_s3_table_functions_timeoutsis flaky on26.7: the test injects a 1200ms network delay and expects the S3INSERTto time out, but when the request reuses a pooled keep-alive connection there is no fresh TCP connect, so the connect timeout does not apply and the write completes —DID NOT RAISE. The fix (already onmaster) makess3_request_timeout_msthe single failure mechanism and asserts the error is a timeout.The fix was never backported, so the flake still hits CI of
26.7backport pull requests, e.g. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112365&sha=dd3a3d84d1e2b05319bf27d88dbefeeb1403ed1b&name_0=BackportPR&name_1=Integration%20tests%20%28amd_tsan%2C%203%2F6%29 (#112365).Test-only change.
Related: #111506
Related: #112365
Changelog category (leave one):