Repository navigation
Fix flaky 02024_storage_filelog_mv - #109109
alexey-milovidov merged 2 commits into
Conversation
The test used two unbounded 'while true; sleep 1' loops to wait for the materialized view to catch up. FileLog's directory watcher and reader task back off exponentially up to poll_directory_watch_events_backoff_max (32s by default), so on slow lanes (WasmEdge+MSan) file-detection latency on the reader reschedule path can stack across the two wait phases past the 600s per-test kill, turning a slow-but-correct run into a TIMEOUT FAIL. Cap poll_directory_watch_events_backoff_max=1000 on the FileLog table (same as 02968_file_log_multiple_read) to bound detection latency to ~1s, and replace the unbounded loops with a bounded wait helper that fails fast with a diagnostic instead of a silent 600s job timeout. Test intent (MV streaming, initial load, touch-produces-no-event, incremental detection) is unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-3:20260702-014600 |
|
cc @antaljanosbenjamin - could you review? Test-only fix for flaky |
|
Workflow [PR], commit [d9de370] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict✅ No new findings. The previously reported parallel-load flake concern is addressed in the current diff. |
The FileLog -> MV streaming path depends on BackgroundSchedulePool task scheduling latency. Under heavy parallel load, pool contention can push file-detection latency past the wait timeout even with a bounded poll_directory_watch_events_backoff_max. The sibling FileLog -> MV tests (02968_file_log_multiple_read, 04242/04257/04342 file_log_*) all run no-parallel for this reason; 02024 is the only one still in the parallel lane. Sequential execution gives consistent runtime. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Done: added I went with option 1 rather than local stress evidence, for two reasons:
The |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 136 line(s), 4 function(s) across 63 file(s) · Details Top files
|
|
Update: the test is now also tagged |
…lelog-mv-backoff Fix flaky 02024_storage_filelog_mv
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Related: #107826 (requested by @alexey-milovidov on that PR, where this test flaked on
Stateless tests (amd_msan, WasmEdge, parallel, 2/2)).Fix flaky
02024_storage_filelog_mv.The test waited for the materialized view with two unbounded
while true; sleep 1loops. FileLog's directory watcher and reader task back off exponentially up topoll_directory_watch_events_backoff_max(32s default), so on slow lanes (WasmEdge+MSan) the reader reschedule path (scheduleAfter(milliseconds_to_wait)) can wait up to 32s per idle cycle. Stacked across the two wait phases plusBackgroundSchedulePoolcontention under parallel load, this exceeds the 600s per-test kill and a slow-but-correct run becomes a TIMEOUT FAIL.Failing report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=107826&sha=2e66578c83c3107834ab5e22b2f921ed42383ae8&name_0=PR&name_1=Stateless%20tests%20%28amd_msan%2C%20WasmEdge%2C%20parallel%2C%202%2F2%29 (
test_duration_ms=600100, reasonTimeout!,sleep 1still running; the runner's own rerun said "not reproducible", i.e. a timing flake).Fix (same approach as the sibling
02968_file_log_multiple_read, PR #101367):poll_directory_watch_events_backoff_max = 1000on the FileLog table to bound file-detection latency to ~1s.no-parallel: FileLog -> MV detection latency depends onBackgroundSchedulePoolscheduling, and under heavy parallel load pool contention can push the wait past its timeout even with a bounded backoff. This matches theno-paralleltag on the sibling02968_file_log_multiple_read.Test intent is unchanged (MV streaming path, initial 20-row load, touch-produces-no-event, incremental detection to 101 rows, same reference).
Version info
26.7.1.411(included in26.7and later)