Repository navigation
Multiple read file log storage in mv - #58877
Merged
Merged
Conversation
Member
|
This is an automated comment for commit f34d1ae with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
kssenii
approved these changes
Jan 17, 2024
kssenii
approved these changes
Jan 18, 2024
Member
|
robot-clickhouse
added a commit
that referenced
this pull request
Jan 29, 2024
robot-ch-test-poll3
added a commit
that referenced
this pull request
Jan 29, 2024
Backport #58877 to 23.12: Multiple read file log storage in mv
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Apr 28, 2026
The deeper-fix attempt (commit 8cd5a2f) capped `poll_directory_watch_events_backoff_max` at 1s, but CI flaky-check still showed 1/50 failures on `Stateless tests (amd_asan_ubsan, flaky check)` at the 120s wait timeout. Local 100/100 with `-j 8` did not reproduce the issue; local `-j 50` with the ASan binary mirrors CI load and is enough to expose the root cause: - Each `FileLog` table occupies two `BackgroundSchedulePool` tasks (`DirectoryWatcherBase::watchFunc` looping on inotify and `StorageFileLog::threadFunc` blocked on `cv.wait`). - With 50 concurrent test instances, the pool sees 100+ resident tasks competing with all other test workloads on the shared schedule pool. - Under that contention the wake-up path (`watchFunc` -> `wakeUp` -> `cv.notify_one` -> `threadFunc` resumes -> `streamToViews`) can take well over 120s in tail cases, even though the polling backoff is bounded to 1s. `no-parallel` removes the contention entirely. Sequential execution gives a consistent 9.7-11.5s per run with the ASan binary (50/50 local, 25/25 in a local `--flaky-check` simulation with `--test-runs 25`). This matches the precedent set by other `FileLog` tests that share the same timing-sensitive streaming path: `02026_storage_filelog_largefile.sh` and `04031_filelog_drop_mv_no_exception.sh`. The bounded backoff added in the previous commit is preserved as defense-in-depth and the comment in `wait_for_row_count` is updated to reflect the new rationale. No changes to test logic or coverage of PR ClickHouse#58877's "multiple read in MV" fix. Verified locally: - `--test-runs 50 -j 1` on ASan: 50/50 pass, 9.70 - 11.46s per run. - `--test-runs 25 --flaky-check` on ASan: 25/25 pass, 9.60 - 11.56s. CI report on previous commit (1/50 fail @ 132.57s): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=103602&sha=8cd5a2ff591de07613831b87db0795a766e88ee8&name_0=PR&name_1=Stateless%20tests%20(amd_asan_ubsan%2C%20flaky%20check)
1 task
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix reading multiple times from FileLog engine in materialized views.
Documentation entry for user-facing changes