Repository navigation
Conversation
…s cache With use_columns_cache = 1, MergeTreeReaderWide::readRowsWithColumnsCache starts a new read call wherever the set of cached columns changes between granules. json.__special_subcolumn_name_for_distinct_paths_calculation is never cached (columns_not_cacheable) and puts all paths of one call into that call's first row, so when a companion column is cached for only some granules of the 10-row part, the per-row output is split over two rows at that granule boundary. The union of paths, which is all distinctJSONPaths consumes, is unchanged. In the parallel CI run the 100 MB cache is shared, admission is adaptive under pressure and concurrent stripe writes can be lost, so partial coverage happens. The failing master job (Stateless tests (amd_tsan, parallel), b62bc5c) shows it in its own query_log: the three failing statements had mixed per-granule coverage (ColumnsCacheHits/Misses 1/2, 2/1, 1/5), and every statement with uniform coverage passed. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=b62bc5c3970468c88fb4e3860cefd2883ca27972&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%29 Pin use_columns_cache = 0 on the 9 statements that check this per-row layout next to another column. The rest of the test keeps the randomized cache, including the 100000-row reads of the subcolumn next to cached columns. The reference is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261005-041600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261005-034600 |
|
Workflow [PR], commit [aacd107] Summary: ✅ AI ReviewSummaryThis PR narrows the layout-sensitive assertions in Final Verdict
|
Related: #96844
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Make the test
03759_distinct_json_paths_optimizationindependent of the randomized columns cache.Description
03759_distinct_json_paths_optimizationhas failed twice since #96844 started randomizinguse_columns_cache. One failure was on master inStateless tests (amd_tsan, parallel)(report), the other on the unrelated #115722 (report). Before that it ran about 25,000 times in 14 days with no failure.With the cache on,
MergeTreeReaderWide::readRowsWithColumnsCachestarts a new read call wherever the set of cached columns changes between granules.json.__special_subcolumn_name_for_distinct_paths_calculationis never cached and puts all paths of one call into that call's first row. So whenjson(orjson.a0, ...) is cached for only some granules, the paths are split over two rows. The union, which is all thatdistinctJSONPathsreads, is unchanged. In the failing master job'squery_log, the three failing statements had mixed per-granule coverage (1 hit / 2 misses, 2/1, 1/5). Every statement with uniform coverage passed.The change pins
use_columns_cache = 0on the 9 statements that check this per-row layout next to another column. The rest of the test keeps the randomized cache, including the 100000-row reads of the subcolumn next to cached columns. The reference is unchanged.Validation, debug build, private server with the CI columns-cache config (100 MB, SLRU):
json, then runSELECT arraySort(<subcolumn>), json: the paths split over rows 0 and 4 (1 hit / 2 misses), every time. With the pin: the reference layout, 0 cache operations.-j 4alongside a cache-pressure loop. In every run, the pinned statements did 0 cache operations.Workflow [PR]
Sync PR [sync-upstream/pr/123942]
Version info
26.10.1.2043-master(included in26.10and later)