Repository navigation
Fix flaky test 02789_filesystem_cache_alignment - #108968
alexey-milovidov merged 2 commits into
Conversation
The test re-derived an expensive view over system.remote_data_paths (a full metadata walk over all disks) for every assertion: 7 times for the file-segment checks and 4 more for the filesystem_cache join. Under thread fuzzer each scan is slow, so the repeated evaluation pushed the test over the 600s per-test timeout (seen on amd_tsan, s3 storage runs). Materialize each derived view into a Memory table once and read from it in the assertions. This cuts the remote_data_paths walk from 7x to 1x and the filesystem_cache scan from 4x to 1x, keeping the test output byte-for-byte identical. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-6:20260630-171500 |
|
cc @kssenii — could you review this? It speeds up the flaky |
|
Workflow [PR], commit [a291f84] Summary: ✅ AI ReviewSummaryThis PR materializes the two expensive derived queries in Final Verdict
|
CI finish ledger — e78459dEvery failure below has an owner: a fixing PR (ours or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
No PR-caused failures. Session id: cron:our-pr-ci-monitor:20260630-233000 |
|
@groeneai merge master into current branch |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 139 line(s), 43 function(s) across 44 file(s) · Details Top files
|
…-filesystem-cache-alignment-timeout Fix flaky test 02789_filesystem_cache_alignment
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
02789_filesystem_cache_alignmentintermittently fails with a 600s per-testtimeout, predominantly on
Stateless tests (amd_tsan, s3 storage, sequential).Root cause: the test builds an expensive derived view over
system.remote_data_paths(a full metadata walk over all disks,arrayJoinofthe cache paths, joined to
system.filesystem_cache_log) as a SQL string andre-evaluates it for every assertion. Counting
QueryFinishrows inquery_log,the original test scans
system.remote_data_paths7 times andsystem.filesystem_cache4 times per run. Under thread fuzzer each scan is slow,so the repeated evaluation pushes total runtime just over the 600s hard per-test
limit. The CI debug log of a timed-out run shows the test reaching its last
echo OKright at the 600s mark, i.e. it is not hung, just doing the same heavywork many times.
Fix: materialize each derived view into a
Memorytable once and read from it inthe subsequent assertions. This reduces the
remote_data_pathswalk from 7x to1x and the
filesystem_cachescan from 4x to 1x. The test output is unchanged(byte-for-byte identical to the existing
.reference), and all checks stillexercise the same conditions.
Verified locally against an S3 (MinIO) backed server: output identical to the
reference across repeated runs, and
query_logconfirms the scan counts dropfrom 7/4 to 1/1.
Version info
26.7.1.393(included in26.7and later)