Repository navigation
Conversation
Deliver the 26.3 leg of the merged fix "Verify array offsets read as absolute values, not only in the Native format" (ClickHouse#109212, `pr-bugfix` + `pr-must-backport`). 26.3 is the only branch of that backport wave still missing it: ClickHouse#118922 (26.6) and ClickHouse#118923 (26.7) merged green. The robot leg ClickHouse#118921 cannot deliver it. Its head `f5e115bf` carries the correct one-line adaptation together with a whole-repository deletion (+1 / -997,602, 4033 files removed), so the branch is unmergeable and, because `.github/` is among the deleted paths, no workflow can trigger on it. I have no push access to that branch (repo `push: false`, `maintainerCanModify: false`), so this PR carries the same content against 26.3 instead. Content is the robot's own two-file cherry-pick with exactly one line adapted. 26.3 predates ClickHouse#96563 "Added a serialization object pool", which introduced the static `SerializationArray::create` and `SerializationNumber<T>::create` factories and made the constructors private, so the ported test's SerializationArray::create(SerializationNumber<UInt8>::create()) does not compile here. That is what reddened `Build (amd_debug)`, `Build (amd_asan)` and `Build (amd_tsan)` on ClickHouse#118921: three errors, all at `gtest_serialization_array_offsets.cpp:61`. It becomes std::make_shared<SerializationArray>(std::make_shared<SerializationNumber<UInt8>>()) which is 26.3's own idiom (`DataTypeArray.cpp`) and is byte-identical to the adaptation already applied on the robot branch at `f5e115bf`. `SerializationArray.cpp` is taken verbatim, with no adaptation. Both hunks it adds are byte-identical to 26.6, where the same backport merged green, and `deserializeBinaryBulkWithMultipleStreams` matches 26.6's whole function. Inside `deserializeOffsetsBinaryBulk` the one remaining difference is the pre-existing line that constructs `SerializationNumber<ColumnArray::Offset>` directly where 26.6 goes through the ClickHouse#96563 pool. So 26.3 converges on the behaviour its siblings already ship rather than getting a variant of the fix. Validated on this branch with clang-21, the compiler 26.3 pins: the single translation unit reproduces the three CI errors with the pre-adaptation line and compiles clean with it; `unit_tests_dbms` builds and all 8 `SerializationArrayOffsets` cases pass; with the `SerializationArray.cpp` hunks reverted and the test kept, `RejectsDecreasingAbsoluteOffsets`, `RejectsDecreaseAcrossRangeBoundary` and `RejectsEmptyElementsWithNonZeroLastAbsoluteOffset` fail, so the ported tests are not vacuous here. Related: ClickHouse#109212 Related: ClickHouse#118921 Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 2 rounds, 1 finding; my own cold
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-11:20260910-150500 |
|
Workflow [BackportPR], commit [3b610e3] |
|
cc @CurtizJ, could you review this? It is the 26.3 leg of #109212, carrying the same two files as the robot branch you adapted at |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Rejects non-monotonic
Arrayoffsets on every read path that decodes them as absolute values, instead of only in theNativeformat. A corruptsetskip index granule previously passed unchecked and was then read out of bounds.Description
Related: #109212 (the merged master fix,
pr-must-backport), #118921 (the robot 26.3 leg). 26.3 is the only branch of the wave still missing it: #118922 (26.6) and #118923 (26.7) merged green.The robot leg cannot deliver it: its head
f5e115bfcarries the correct one-line adaptation alongside a whole-repository deletion,+1 / -997,602over 4033 files, so the branch is unmergeable and,.github/being deleted, no workflow can trigger on it. I have no push access to it (push: false,maintainerCanModify: false), so this PR carries the same content against26.3, as #116837 did.The content is the robot's own two-file cherry-pick, one line adapted. 26.3 predates #96563, which added the static
SerializationArray::create/SerializationNumber<T>::createfactories, so the ported test's line 61 does not compile here. That reddensBuild (amd_debug),(amd_asan)and(amd_tsan)on #118921: three errors, all on that line. It becomesstd::make_shared<SerializationArray>(std::make_shared<SerializationNumber<UInt8>>()), 26.3's own idiom, byte-identical to the adaptation already on the robot branch.SerializationArray.cppis verbatim: both changed hunks are byte-identical to 26.6, differing elsewhere in those two functions only by its #96563 pool idiom. So 26.3 converges on what its siblings ship.Validated with clang-21, which 26.3 pins: the translation unit reproduces the three CI errors without the adaptation and is clean with it;
unit_tests_dbmsbuilds and all 8SerializationArrayOffsetscases pass, 400 of 400 over 50 shuffled repeats; with the source hunks reverted and the test kept, three of the eight fail, so the ported tests are not vacuous here.A single push resetting
backport/26.3/109212tod11769ca6plus this line would be cheaper; say so and I will close this. One cost: under agroeneai/...head the automatedBackported tolist on #109212 will not pick up 26.3, sincetests/ci/pr_version_info.pyscans that head ref; this PR still gets its ownMerged intoline.