Repository navigation
Make test 02516_projections_with_rollup faster - #125496
Conversation
The test inserted 1,728,000 random rows and then ran two MATERIALIZE PROJECTION mutations with mutations_sync = 1. Their cost is linear in the row count, and with random MergeTree settings such as min_bytes_for_full_part_storage (whole-part rewrite on mutation) and a small merge_max_block_size they took 185 s of a 196 s run in Stateless tests (amd_tsan, s3 storage, targeted), over the 180 s limit. The checked query (ROLLUP + TOTALS + LEFT JOIN over the aggregate projection, the ClickHouse#42772 case) is plan-level and reads ~200 rows of p_agg, so 172,800 rows are enough: p_agg is still selected, and the queries, projections and reference are unchanged. 02371_select_projection_normal_agg shares the fixture but is left as is: a row cut there lets part pruning drop its normal projection, and it has no gated failures. 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; 1 finding;
Also noticed: Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261012-200500 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261012-194800 |
|
Workflow [PR], commit [f2ba24b] Summary: ✅ AI ReviewSummaryThis PR reduces the fixture in Final VerdictStatus: ✅ Approve. |
CI finish ledger - f2ba24bEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
CIDB has no other Session id: cron:our-pr-ci-monitor:20261013-023009 |
|
@groeneai is this pr still needed? |
|
Not for the reason I opened it. The slow tail of this test disappeared from master around 2026-10-20 (CIDB):
I have not identified which master change removed the tail. The PR is still correct, but nothing needs it now, so I think it can be closed. |
|
Correction to my answer above: I only checked the MSan and TSan durations, and the slow path is still reachable. #129676 clamps |
3faf20b
Related: #109052
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Make the test
02516_projections_with_rollupfaster by inserting 10x fewer rows.Description
02516_projections_with_rolluptook 196 s, over the 180 s limit, in Stateless tests (amd_tsan, s3 storage, targeted) on #109052. In that run the twoMATERIALIZE PROJECTIONmutations over the 1,728,000-row fixture took 185 s (randommin_bytes_for_full_part_storagemade each one rewrite the whole part), while the checked query took 0.2 s.The checked query (ROLLUP + TOTALS + LEFT JOIN over the aggregate projection, the #42772 case) reads only about 100 rows of
p_agg(one per hour and domain), so this inserts 172,800 rows instead. The queries, projections and reference are unchanged, andp_aggis still used in every run with projections enabled (144/144 under TSan, 35/35 in debug).Validation with the TSan binary of that CI run, pinned to 16 CPUs,
--flaky-check -j 9, 50 runs: p50 17.9 s -> 3.0 s, max 42.2 s -> 6.0 s. With the failing run's exact settings: 38.9 s -> 4.8 s per run.Workflow [PR]
Sync PR [sync-upstream/pr/125496]
Version info
26.11.1.2804-master(included in26.11and later)