Repository navigation
Do not log one message per decompressed block in CompressedReadBufferFromFile - #111546
Conversation
…FromFile CompressedReadBufferFromFile::nextImpl and readBig logged one LOG_TEST message per decompressed block. For a column stored in many tiny compressed blocks this is one message per block; the LogSeriesLimiter member does not help because it decides once per buffer instance and then lets every message through. At test log level (stress tests) this is a log storm: the fuzzed query 'select json.a from test format Null' over a JSON column with max_compress_block_size=128 decompressed ~1.39M blocks and spent 486 of 493 seconds inside the logger, tripping the hung-check (one sub-cause of ClickHouse#107941). Drop the two per-block logs; keep the per-open and per-seek logs. Related: ClickHouse#107941 CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110188&sha=a164a556c0b418fb645e8db05d908f1fc976bd2b&name_0=PR&name_1=Stress%20test%20%28arm_debug%29 Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-author-slot-5:20260723-062000 |
Internal second-model review (click to expand)An independent model reviewed the resulting code before this PR was opened. Findings and dispositions: ❌ Blockers: none.
💡 Nits:
|
|
cc @scanhex12 — could you review this? It removes a per-decompressed-block |
|
Workflow [PR], commit [2482e58] Summary: ✅
AI ReviewSummaryThis PR removes the two per-decompressed-block Final VerdictStatus: ✅ Approve |
The style check forbids the global SYSTEM FLUSH LOGS form (ci/jobs/scripts/check_style/various_checks.sh); the test only reads system.query_log, so flush just that table. Co-Authored-By: Claude Opus 4.8 <[email protected]>
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 5/6 (83.33%) · Uncovered code |
…d-buffer-per-block-log Do not log one message per decompressed block in CompressedReadBufferFromFile
Do not log one message per decompressed block in CompressedReadBufferFromFile
Related: #107941
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
CompressedReadBufferFromFile::nextImplandreadBigemitted oneLOG_TEST"Decompressing ..." line per decompressed block. For a column stored in many tiny compressed blocks this is one log message per block. TheLogSeriesLimitermember does not help here: it decides once per buffer instance and then lets every subsequent message through, so a single long-lived buffer logs every block.At
testlog level (used by the stress test) this becomes a log storm. Example from the arm_debug stress hung-check on the head of #110188: the fuzzed queryselect json.a from test format Nullover aJSONcolumn withmax_compress_block_size = 128decompressed ~1.39M blocks and produced ~1.39MLogTestmessages, spending 486 of 493 seconds inside the logger (LoggerElapsedNanoseconds), tripping the hung-check. This is one sub-cause of the chronic #107941.Fix: drop the two per-block "Decompressing ... bytes" logs. The per-open ("Decompressing {file}") and per-seek logs are kept, so the diagnostic still shows which file is read and where it seeks. No behavior change outside
test-level logging (at other levels these lines were already skipped before formatting).Reproduced locally on a debug build: first cold read of such a column produced
LogTest == CompressedReadBufferBlocks(86077 for a 300-row part) before the change andLogTest = 19after, with the same number of decompressed blocks. Added04545_compressed_read_buffer_no_per_block_log_stormwhich asserts the TEST log count stays small while many blocks are decompressed.CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110188&sha=a164a556c0b418fb645e8db05d908f1fc976bd2b&name_0=PR&name_1=Stress%20test%20%28arm_debug%29
Version info
26.8.1.45(included in26.8and later)