Repository navigation
Fix flaky test_url_reconnect - #114527
Fix flaky test_url_reconnect#114527
test_url_reconnect#114527Conversation
The test blocks the outgoing connections to the HDFS datanode web port
with a silent `DROP` and heals the network only after the client has
demonstrably hit a connect timeout, waiting up to 30 seconds for a fresh
`connect timed out` line in the server log.
That budget is not always enough, because the query does not necessarily
open a new connection at all: the earlier tests in the module leave
keep-alive connections to `hdfs1:50075` in the HTTP connection pool, and
a silent `DROP` kills an already established connection only by the
receive timeout - `http_receive_timeout`, 30 seconds by default - rather
than by the one-second connect timeout. The first try then dies after 30
seconds with a bare `Timeout`, and the first `connect timed out` line
appears only on the next try, about 31 seconds into the query, just past
the budget:
16:57:35.001 executeQuery: select sum(cityHash64(id)) from url('http://hdfs1:50075/...
16:58:05.013 ReadWriteBufferFromHTTP: ... Error: Timeout. Failed at try 2/10.
16:58:06.115 ReadWriteBufferFromHTTP: ... Error: Timeout: connect timed out: 172.16.1.2:50075. Failed at try 3/10.
Drop the connection cache before installing the rule, so the query has
to open a fresh connection and the first try fails by the connect
timeout, as the test expects. Also raise the wait budget to 60 seconds:
the loop exits as soon as the line shows up, so a generous budget costs
nothing on a healthy run.
Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110130&sha=7acc19de7fb0c97f7ea0fb7c6c234930d188ac66&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%205%2F8%29
Related: #110130
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [9dc9d78] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict✅ Looks good to merge. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 5 s compile time in total, 6 of them have a recent master baseline. |
Related: #110130
test_redirect_url_storage/test.py::test_url_reconnectblocks the outgoing connections to the HDFS datanode web port with a silentDROPand heals the network only after the client has demonstrably hit a connect timeout, waiting up to 30 seconds for a freshconnect timed outline in the server log.That budget is not always enough, because the query does not necessarily open a new connection at all: the earlier tests in the module leave keep-alive connections to
hdfs1:50075in the HTTP connection pool, and a silentDROPkills an already established connection only by the receive timeout -http_receive_timeout, 30 seconds by default - rather than by the one-second connect timeout. The first try then dies after 30 seconds with a bareTimeout, and the firstconnect timed outline appears only on the next try, about 31 seconds into the query, just past the budget:The fix drops the connection cache before installing the rule, so the query has to open a fresh connection and the first try fails by the connect timeout, as the test expects. The wait budget is also raised to 60 seconds: the loop exits as soon as the line shows up, so a generous budget costs nothing on a healthy run.
Seen in an unrelated pull request: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110130&sha=7acc19de7fb0c97f7ea0fb7c6c234930d188ac66&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%205%2F8%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.8.1.1294(included in26.8and later)