Repository navigation
Do not log the size of a set that the in-place set-build failpoint abandons - #127786
PedroTadim merged 3 commits into
Conversation
…andons The test failpoint `prepared_sets_build_ordered_set_inplace_fail` simulates an abandoned speculative in-place set build: `CreatingSetsTransform::generate` skips `Set::finishInsert`, but it then called `finishSubquery`, whose debug log reads `Set::getTotalRowCount` of the set it had just decided not to create. Since the external `IN` set can spill while it is built, `spillWhileBuilding` moves the keys into the disk set builder and resets `data`, and only `finishInsert` turns the builder into `disk_set`. An unfinished spilled set therefore has neither, and `getTotalRowCount` hits `chassert(data)` (a null dereference in a release build). The log arguments are evaluated only at debug level, which the CI server uses. AST fuzzer (amd_debug) hit it on PR ClickHouse#112918 (STID 2508-39cf) replaying 04489 with `max_bytes_before_external_set = 1`. A real early stop of the in-place pipeline (a subquery timeout with `overflow_mode = 'break'`, a cancel) never reaches `generate`, so the failpoint now returns without calling `finishSubquery`, like a real abandoned build. The normal path is unchanged. 04489 gets an arm that abandons a spilled in-place build and checks that the deferred build still returns the right count and that both builds spilled. 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-8:20261025-173000 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261025-170700 |
|
Workflow [PR], commit [70061b4] Summary: ❌
AI ReviewSummaryPR #127786 prevents the in-place set-build failpoint from logging the size of an unfinished spilled Final VerdictStatus: ✅ Approve. |
|
cc @alexey-milovidov @nihalzp, could you review this and add the |
CI finish ledger - 1948228Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
The first run of this head stopped at Session id: cron:our-pr-ci-monitor:20261027-203012 |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 9 s compile time in total, 7 of them have a recent master baseline. |
d6c89bc
Related: #112918
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
AST fuzzer (amd_debug) aborted with
Logical error: 'data'(STID 2508-39cf) while replaying04489_not_ready_set_inplace_buildin a session withmax_bytes_before_external_set = 1.The test failpoint
prepared_sets_build_ordered_set_inplace_failsimulates an abandoned in-place set build:CreatingSetsTransform::generateskipsSet::finishInsert, but it still calledfinishSubquery, whose debug log readsSet::getTotalRowCount. An externalINset can spill while it is built, and such a set, if never finished, has neither its keys in memory (spillWhileBuildingresets them) nor a disk set (onlyfinishInsertcreates it), sogetTotalRowCounthitschassert(data). A real early stop never reachesgenerate, so only the failpoint is affected.The failpoint now returns without calling
finishSubquery, the way a real abandoned build stops. No production path changes.04489_not_ready_set_inplace_buildgets an arm that abandons a spilled in-place build and checks that the deferred build still returns the right count and that both builds spilled (SetsSpilledToDiskgrows by at least 2).Validation: on the unfixed debug build the arm aborts the server with the CI stack (
Set::getTotalRowCount<-CreatingSetsTransform::finishSubquery). With the fix it passes 50/50 randomized runs, each with exactly 2 spills. Withoutmax_bytes_before_external_set = 1the spill check fails, so the arm cannot pass vacuously.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127786]
Version info
26.11.1.1067-master(included in26.11and later)