Repository navigation
Add test: Mixed-codec stream read through CachedCompressedReadBuffer (use_uncompressed_cache=1) is untested - #108877
Conversation
|
Pre-PR Validation Gate (per ClickGap pipeline): a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [cebc24e] Summary: ✅ AI ReviewSummaryThis PR adds a stateless regression test for the compact-part mixed-codec read path behind Final Verdict
|
|
Continued via Merged The only CI failures are an unrelated master-wide flake. The test is well-formed: it forces a Compact part via Blocked only on a fresh CI run and maintainer merge. |
|
Refreshed via Re-merged current The covered code path is still present on latest The prior CI reds were the unrelated master-wide flake #107941 ( I re-verified the test's output locally ( |
|
Merged the latest |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 91 line(s), 3 function(s) across 43 file(s) · Details Top files
|
…pr108592 Add test: Mixed-codec stream read through `CachedCompressedReadBuffer` (`use_uncompressed_cache=1`) is untested
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #108592.
That PR (1) The PR makes the MergeTree reader tolerate a single compressed stream whose consecutive blocks use different codecs (the read side of adaptive codec selection, RFC #105404). It deletes the
MergeTreeReaderSettings::allow_different_codecsflag and instead hardcodes `allow_different_codecs = true1. Mixed-codec stream read through
CachedCompressedReadBuffer(use_uncompressed_cache=1) is untestedsrc/Storages/MergeTree/MergeTreeReaderStream.cpp:123Risk:
MergeTreeReaderStream::initpicks the buffer byelse if (uncompressed_cache)(line 105): withuse_uncompressed_cache=1and the server's uncompressed-cache object present, it buildsCachedCompressedReadBuffer(..., /* allow_different_codecs */ true)(line 123); that buffer reuses one instance across the stream's blocks, so a ZSTD block followed by a NONE block must be tolerated. RISK: if this flag regresses tofalse, every read of a mixed-codec (Compact/adaptive) part with the …What's unique vs PR tests: The PR's 04409 test and the gtest both read the mixed-codec stream through
CompressedReadBufferFromFile/CompressedReadBuffer(no uncompressed cache). This test addsuse_uncompressed_cache=1, the only way to reach the separateCachedCompressedReadBufferbranch (line 123), whose flag the PR also flipped but no test covers.Tags:
-- Tags: no-random-merge-tree-settings—no-random-merge-tree-settings: randomized min_bytes/min_rows_for_wide_part would turn the part Wide, splitting columns into separate single-codec streams and losing the mixed-codec scenario.Try it on ClickHouse Fiddle
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes
Version info
26.7.1.509(included in26.7and later)