Repository navigation
Do not read the master-only system.parts.files column in 04550_restore_fsync_after_insert - #115117
Conversation
…e_fsync_after_insert The test read the `files` column of `system.parts` to size the encrypted-incremental-restore fsync assertion. That column was added by 476e9fc in January, after 25.8 forked, so the automated 25.8 backport of ClickHouse#111378 (ClickHouse#115088) fails at runtime with UNKNOWN_IDENTIFIER even though the cherry-pick applied cleanly and the script is byte-identical to master. The empty shell variable then also fails the `{files:UInt64}` parameter binding. The count the assertion wants is how many files RESTORE copies and must therefore fsync. The test already measures exactly that for its first table via `SELECT path FROM system.parts` plus `find`, so feed the encrypted arm the same count and drop the column read. The two tables have identical schema, data and part-layout settings, so their parts hold the same file set; the physical count is also larger than the checksums map (18 vs 14 on master), since it covers checksums.txt, columns.txt and the zero-byte arr.bin, so the assertion gets stronger rather than weaker. Validated on the official 25.8 binary: the old test reproduces both errors, the new one runs to completion. On master the encrypted restore performs 20 FileSync events against a required 18, the two arms' part file lists are identical on both branches (18 files on master, 15 on 25.8), disabling fsync_after_insert still fails the test, and 50/50 runs pass with randomized settings. Related: ClickHouse#111378 Related: ClickHouse#115088 Co-Authored-By: Claude Fable 5 <[email protected]>
Internal second-model review (click to expand)An independent model reviewed this diff cold, plus my own cold review of the resulting code.
The claim: because the encrypted arm asserts The shape is accurate, but it is arm 3's pre-existing design from #111378 and this diff strictly More decisively, the regression this oracle exists to catch cannot be partial. The suggested remedy (a second encrypted table with Recorded as a residual rather than dismissed: arm 3 is weaker than arm 1 by construction. It is 💡 Two nits from my own review, not fixed (noted, not blocking)
Session id: cron:clickhouse-review-slot-11:20260817-095700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20260817-093300 |
|
Workflow [PR], commit [fd8fc0c] Summary: ❌
AI ReviewSummaryThis PR removes the master-only Final Verdict✅ No code review findings. The only red CI job on this PR is the unrelated |
|
cc @jkartseva, could you review this? It is a test-only fix: 04550 read the |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
CI finish ledger - fd8fc0cEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Notes on the two reds that are not failures:
Evidence for the hung check, read from
Reproduced off CI on a master debug build, with controls: FixedString takes 1.38s / 4.88s / 13.27s This PR's diff is one shell test file ( Session id: cron:our-pr-ci-monitor:20260817-150000 |
062bb79
|
Fixing PR for the Root cause is what the ledger line recorded: for a |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
04550_restore_fsync_after_insert.sh(added by #111378) read thefilescolumn ofsystem.partsto size the encrypted-incremental-restore fsync assertion. That column was addedby 476e9fc in January, after 25.8 forked, so the automated 25.8 backport #115088 fails at
runtime even though the cherry-pick applied cleanly and the script is byte-identical:
CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115088&sha=980e9739e2ff0687cec113ed6460d38af75034f6&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29
The count the assertion wants is how many files RESTORE copies and must therefore fsync. The test
already measures exactly that for its first table, with
SELECT path FROM system.partsplusfind. This drops thesystem.parts.filesread and feeds the encrypted arm the same count. Thetwo tables have identical schema, data and part-layout settings, so their parts hold the same file
set; the assertion gets stronger, since the physical count also covers
checksums.txt,columns.txtand the zero-bytearr.binthat the checksums map does not enumerate..referenceis unchanged.
Validation: on the official 25.8 binary the old test reproduces both errors above and the new one
runs to completion. On master the encrypted restore performs 20
FileSyncevents against arequired 18, and the two arms' part file lists are identical on both branches (18 files on master,
15 on 25.8), so the reuse does not depend on a master-specific layout. Disabling
fsync_after_inserton the encrypted table still fails the test, so the assertion is not vacuous.50/50 runs green with randomized settings.
Note that #115088 cannot pick this up by regeneration: the backport tree is built from #111378's
merge commit, so a regenerated backport carries the same broken line.
Version info
26.8.1.1602(included in26.8and later)