Repository navigation
Keep 02010_lc_native on the local disk and use the test timeout for its socket - #127034
Conversation
On the azure lane the default MergeTree storage policy is a write-through filesystem cache. The test's valid native-protocol INSERT writes a one-row part, and every file of that part reserves cache space under the cache's priority write lock. In Stateless tests (arm_asan_ubsan, azure, parallel) on PR ClickHouse#126978 that INSERT spent 34.07 s of 34.43 s waiting on the lock (FilesystemCachePriorityWriteLockMicroseconds), so the server's correct End of stream arrived 4.4 s after the python client's hard-coded 30 s socket timeout and the test failed with TimeoutError in readStrict. The storage is incidental to a native-protocol LowCardinality test, so pin the table to storage_policy = 'default' (the local disk on every lane). The part write stays MergeTree, the 30 s hang guard and the .reference are unchanged. Same shape as ClickHouse#122567 (04344) and ClickHouse#126252 (04949) for this lock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings; No findings to adjudicate on this revision. Session id: cron:clickhouse-review-slot-10:20261020-203300 |
|
cc @CheSema, could you review this and add the |
|
Workflow [PR], commit [2d88050] Summary: ✅ AI ReviewSummaryPR #127034 keeps Final Verdict✅ Approve |
Algunenano
left a comment
There was a problem hiding this comment.
@groeneai I think in general this is positive since it makes the test faster, but maybe we should increase the timeouts of the socket operation in Python (even if it's just this call) so it matches the tests timeout defaults
The python client hard-coded a 30 s socket timeout, while the harness gives the test `CLICKHOUSE_TEST_TIMEOUT` seconds (600 by default), so a slow but working server failed it. Take the socket timeout from that variable instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
02010_lc_native on the local disk02010_lc_native on the local disk and use the test timeout for its socket
|
Done in 2d88050: all four socket timeouts in |
Related: #126978
Related: #121512
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The
02010_lc_nativetest now keeps its table on the local disk and takes its socket timeout from the test timeout instead of a fixed 30 s.Description
02010_lc_nativefailed inStateless tests (arm_asan_ubsan, azure, parallel)with
TimeoutError: timed outwhile its valid insert awaited End of stream, 30 s after the python clientstarted (its
s.settimeout(30)).The server was not stuck, only late. On the azure lane the default
MergeTreepolicy is a write-throughfilesystem cache, and that one-row insert spent 34.07 s of its 34.43 s in
FilesystemCachePriorityWriteLockMicroseconds. End of stream went out 4.4 s after the client gave up. Inthe same job, parts on that cache took up to 78 s, parts on the local
defaultdisk at most 60 ms.Two changes,
.referenceuntouched:storage_policy = 'default'(the part write staysMergeTree; same shape as Fix flaky 04344_server_ast_fuzzer_insert_limit (filesystem cache lock wait) #122567 andFix flaky test
04949_distributed_plan_runtime_filter_receiver_no_lingering#126252 for this lock);CLICKHOUSE_TEST_TIMEOUT(600 s by default) instead of 30 s, so a slowbut working server no longer fails the test, and a real hang is caught by the test timeout.
Validation: on a local write-through cache rig, a failpoint pausing cache eviction reproduces the CI
traceback 2/2 at 30.19 s with the old table and the insert passes 2/2 in 0.27 s with the new one. Against a
proxy delaying every server reply by 31 s, the old client times out at 30 s and the new one passes; with
CLICKHOUSE_TEST_TIMEOUT=10it times out at 10 s. 50/50 randomized runs pass.Workflow [PR]
Sync PR [sync-upstream/pr/127034]
Version info
26.11.1.459-master(included in26.11and later)