Skip to content

Skip packing and decoding pages of a part's merged offsets that are consecutive - #120982

Merged
CurtizJ merged 4 commits into
ClickHouse:masterfrom
groeneai:text-index-merge-affine-part-offsets
Sep 20, 2026
Merged

CurtizJ merged 4 commits into
ClickHouse:masterfrom
groeneai:text-index-merge-affine-part-offsets

Conversation

@groeneai

@groeneai groeneai commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes: #120802

Changelog category (leave one):

  • Performance Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Improve performance of merges of tables with a text index. Pages of a source part's row ids that hold consecutive values are now stored as a first value plus a count, so they are neither bit-packed nor decoded per posting row id and need no storage for packed values. This covers every page of parts over disjoint sorting-key ranges or of a table without one, and most pages of parts disjoint apart from a few interleaved rows. The produced index is unchanged.

Description

Merging a text index remaps every posting's row id into the merged part's numbering, one PackedPartOffsets::operator[] per (row, token) pair: pages[i >> 10][i & 1023], two dependent loads plus shift and mask. A 600k-row 6-part merge does 9.0M of them, a 1.8M-row one 11.5M.

MergedPartOffsets::insert receives each part's merged row numbers strictly increasing. Where the merge does not interleave that part's rows they are also consecutive, and such a page needs no storage at all: flush() recognizes it by back() - front() == size() - 1 (exact for strictly increasing values), stores it as min_val plus a count with nothing packed and no arena allocation, and Page::operator[] returns min_val + i. It reuses the existing i == 0 return, so the decode path gains one comparison and no new branch.

Per page rather than per map: a break spoils only the page holding it, so a part disjoint but for a few interleaved rows keeps the fast path elsewhere - 97.4% of its pages on such a layout.

Measured with OPTIMIZE ... DRY RUN PARTS over the fixtures of tests/performance/text_index_merge.xml, 16 paired repetitions with the arm order rotated, an A/A null subtracted:

layout net
parts over disjoint key ranges -8.3% to -9.7%, CIs exclude 0
disjoint but for two rows per boundary (new fixture) -6.9% and -9.0%, CIs exclude 0
every part taking every 6th key unchanged on 3 of 4, +3.0% on the fourth

CPU moves with wall clock. Such a page also stops costing 1.25 KiB of arena per 1024 rows.

The produced index is byte-identical: over 6 part layouts (disjoint, interleaved, mixed, mostly disjoint, single part, ORDER BY tuple()) all 125 files of the merged parts, 36 of them skp_idx_*, equal master's.


Workflow [PR]
Sync PR [sync-upstream/pr/120982]

Version info

  • Merged into: 26.10.1.288-master (included in 26.10 and later)

Merging a text index remaps every posting's row id from the source part's
numbering into the merged part's numbering, one PackedPartOffsets::operator[]
call per (row, token) pair. Each call decodes a Frame-of-Reference page,
pages[i >> 10][i & 1023]: two dependent loads plus a shift and a mask, with no
locality between consecutive postings of a token. A 600k-row merge of 6 parts
performs 8,969,216 of these lookups, a 1.8M-row one 11,520,000.

MergedPartOffsets::insert feeds each source part's map the merged row numbers
of that part's rows, strictly increasing, one per source row, in source-row
order. A merge that does not interleave the part's rows with another part's
rows leaves those numbers consecutive, which is the ordinary case: parts
covering disjoint ascending ranges of the sorting key, and every part of a
table without a sorting key, where the merge concatenates. For such a map the
lookup is the affine function first_value + i, so tracking consecutiveness
during insertion turns it into one addition and the page is never touched.
The returned values are unchanged, so the produced index is byte-identical.

The branch goes into PackedPartOffsets::operator[], the only reader of the
values, rather than one level up: that keeps the flag next to the state that
defines it and covers both users of the map, the text index merge and the
projection _parent_part_offset remap in MergeTreeSequentialSource.

consecutive starts false rather than true so that a map which received no
values keeps master's failure behaviour: with true, a lookup on an empty map
would return a plausible first_value + i where the page assertion fires today.
The ordering chassert in insert is replaced by a strictly stronger one, since
the old form skipped the check on the first value of every new page, the
buffer having just been flushed.

Measured with OPTIMIZE ... DRY RUN PARTS over the fixtures of
tests/performance/text_index_merge.xml, 15 paired repetitions per arm with
alternating arm order and a same-protocol A/A null subtracted: -6.1% to -9.7%
on 6 parts covering disjoint key ranges, all four 95% confidence intervals
excluding zero, with CPU time moving with the wall clock. On the counter
layout, 6 parts each taking every sixth key, where the branch can never fire,
the extra test costs +1.5% to +2.5%.

The pages are still built for a consecutive map; eliding them needs a second
mechanism and is not attempted here.

Related: ClickHouse#120802
Reduce the new member block's comment to the merge property a reader cannot derive here; drop the restatement of insert()'s precondition and the narration of the fast path.
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-issue PR origin: picked up an external GitHub issue labels Sep 19, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 2 findings), plus my own cold review
of the resulting code before reading any of the implementation evidence (3 findings). No blockers,
no fix round needed.

One tradeoff deserves a maintainer's judgment rather than my own. The affine test sits in
PackedPartOffsets::operator[], so a map that is not affine pays one extra predicted test per
lookup: +1.5% to +2.5% on the fully-interleaved layout against -6.1% to -9.7% where the fast path
fires, both in the description. Hoisting the dispatch out of the per-row loops would remove that
cost, but its natural home is the batched remap that arrives with #113856, so I kept this diff
inside one header rather than colliding with an approved PR in the same files.

# Sev Finding Verdict Evidence / action
1 ⚠️ The new unit tests assert result equality only, so forcing consecutive false would leave them green DISAGREE Forcing it true is caught in-tree: mutating if (consecutive) to if (true) reddens ConsecutiveWithOneGap and GapAtPageBoundary (13 failures). The never-set direction is performance-only, and it is guarded where it matters: tests/performance/text_index_merge.xml already holds three firing / non-firing fixture pairs over both posting list codecs, so the Performance Comparison job sees a lost fast path as a 6 to 10% move. Selection itself I measured with temporary counters rather than argued: 8,969,216 of 8,969,216 lookups on the fast path for the disjoint vocabulary fixture, 0 for its intersecting twin, 2 of 4 maps on a mixed merge, fallback counts matching the interleaved row counts exactly. If you want it pinned in-tree as well, the minimal form is an isConsecutive accessor asserted in those two cases; I left it out because it lands in the member block #113856 rewrites.
2 ⚠️ The always-false branch also charges the projection _parent_part_offset remap, which was not benchmarked DISAGREE That consumer does one lookup per row, inside a per-row envelope that runs convertToFullColumnIfSparse, IColumn::mutate and shrinkToFit over every column of the block (MergeTreeSequentialSource.cpp:272-292); the text index loop does 6.4 to 14.9 lookups per row around a single array append. Its expected cost is far below the 0.5 to 1.3% second-position bias my A/A null measured, so a bespoke benchmark there could not discriminate it. That consumer also gains the same fast path in the same layouts, and it never reaches this code at all for a parent without a sorting key (MappingMode::Disabled). Its carrier tests pass on the fix arm with no assertion firing.
3 ⚠️ The per-lookup branch costs +1.5% to +2.5% wherever the map is never affine DISAGREE Measured, and disclosed in the description and the commit message together with the fact that this contradicts the issue's report of its counter-fixture as not slower. Against it: -6.05, -8.69, -9.71 and -8.40% on the four disjoint fixtures, all 95% intervals excluding zero, CPU moving with wall clock in both directions. The one cheap alternative explanation, member placement inside the class, I tested and reverted because the data did not support it.
4 💡 MinimalBitWidth (100..105) and VerySmallValues (0..5) hold consecutive values, so neither reaches the packed decoder any more AGREE No coverage lost: ConsecutiveWithOneGap (100,101,102,104,105,106) reproduces the same bits_per_val of 3, and the random-step cases starting at 0 keep min_val 0 on the packed path. Recorded here rather than spending description budget on it.
5 💡 The description said "28 added lines" where git diff --numstat reports 29 insertions and 1 deletion AGREE Reworded before the description was frozen; it no longer quotes a diffstat.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal
per finding. The reviewed tree was not edited during review.

Session id: cron:clickhouse-review-slot-9:20260919-064504

@clickhouse-gh clickhouse-gh Bot closed this Sep 19, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Sep 19, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7906c68]

Summary: ❌

job_name test_name status info comment
Upgrade check (amd_release) FAIL
Error message in clickhouse-server.log (see upgrade_error_messages.txt) FAIL cidb IGNORED
Performance Comparison (amd_release, master_head, 1/6) FAIL Performance dashboard
order_by_read_in_order #1 FAIL dashboard IGNORED
math_exp #5 slower query history IGNORED
Performance Comparison (arm_release, master_head, 3/6) FAIL Performance dashboard
and_compare_chain_derived #2 FAIL dashboard IGNORED
Build profile diff ERROR IGNORED

AI Review

Summary

The PR narrows the optimization to page-local consecutiveness inside PackedPartOffsets, so both existing consumers still see the same _part_offset mapping while consecutive pages skip packing and decode work. I reviewed the current diff, the touched files, and the prior discussion, and I did not find a remaining correctness, compatibility, or coverage issue that warrants a new review comment.

Final Verdict

✅ No new findings.

LLVM Coverage Report

Measured on commit 7906c68.

Metric Baseline Current Δ
Lines 88.50% 88.50% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 80.70% 80.70% +0.00%

Changed lines: Changed C/C++ lines covered: 96/96 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Sep 19, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes, on demand. The costly path is entered 8,969,216 times per 600k-row 6-part merge and 11,520,000 times per 1.8M-row one, counted directly with temporary branch counters; the timing protocol is 15 paired repetitions with alternating arm order, candidate slower in 0/15 reps on 3 of 4 contiguous fixtures. Not a crash or wrong result, so there is no failing assertion to reproduce.
b Root cause explained? MergeTextIndexesTask::adjustPartOffset remaps one posting row id at a time through PackedPartOffsets::operator[], which decodes a Frame-of-Reference page (pages[i >> 10][i & 1023], two dependent loads plus shift/mask). MergedPartOffsets::insert feeds each part strictly increasing merged row numbers, one per source row, so when the merge does not interleave that part's rows the map is the affine function first_value + i.
c Fix matches root cause? Yes. The branch sits in the only reader of the values, next to the state that defines it. No widened bound, no suppressed check, no new setting; the insert ordering chassert is replaced by a strictly stronger one that also holds across page boundaries.
d Test intent preserved / new tests added? No existing case edited. Five added to the existing gtest_merged_part_offsets.cpp: ConsecutiveValues, ConsecutiveWithOneGap, GapAtPageBoundary, SingleValueConsecutive, MergedPartOffsetsTest.MixedContiguousAndInterleavedParts. Two existing cases (MinimalBitWidth, VerySmallValues) now take the fast path, so the small-dense-diff packed shape they covered is re-covered by ConsecutiveWithOneGap.
e Both directions demonstrated? Yes. Pristine-HEAD vs fix binaries on the same on-disk data: -6.1% to -9.7% on the layout where the branch fires, byte-identical output on all five layouts. Each new test was also shown to FAIL under a mutation of the exact line it guards: first_value + i + 1 reddens 3 of them, if (true) in place of if (consecutive) reddens the other 2, and initialising consecutive = true turns an empty-map lookup from Logical error: 'page_pos < pages.size()' into a silent 0.
f Fix is general across code paths? PackedPartOffsets::insert is the only writer and operator[] the only reader (grep -rn PackedPartOffsets src/ finds only the header and its gtest), so one branch covers both consumers: the text index merge and the projection _parent_part_offset remap. Row-reducing merges reach neither (MergeTask.cpp:3371 gates the first on !merge_may_reduce_rows; :1477 sends a with_parent_part_offset projection to rebuild).
g Fix generalizes across inputs (params/datatypes/wrappers)? Both posting_list_codec values, with and without posting_list_block_size, 5 part layouts (disjoint / fully interleaved / mixed / single part / ORDER BY tuple()), gaps at and away from a page boundary, single value, non-zero first value, runs spanning 3 pages; the suite's existing MaximumBitWidth, VeryLargeValues and word-boundary cases stay green.
h Backward compatible? (maintainer-approved exception only) Nothing is engaged: no setting, no SettingsChangesHistory or getMergeTreeSettingsChangesHistory entry, no serialization change, and the produced index bytes are identical, so parts written before and after this change are indistinguishable.
i Invariants and contracts preserved? Added invariant: consecutive implies operator[](i) == first_value + i for every i the decode is defined on; enforced at the single writer, asserted at the reader. flush, clearTemporaryStorage and MergedPartOffsets::clear leave no partial flag state (noValues() also tests pages, covering the single-value flush path that does not clear current_page_values). Empty-map failure behaviour unchanged. A debug-build sweep of 236 text-index and projection _part_offset tests plus 350 randomized runs produced 0 Logical error.

Session id: cron:clickhouse-impl-slot-6:20260919-044900

@groeneai
groeneai requested review from CurtizJ and ahmadov September 19, 2026 07:34
@clickhouse-gh clickhouse-gh Bot added the comp-mergetree MergeTree* family: parts, merges, primary index, column statistics, background data transformation. label Sep 19, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing commit 7906c68ce1eeae750262fcd66841c189a287f666 with master failed: RuntimeError: CI logs cluster query failed: SELECT file, countIf(side = 'pr') AS pr_cou….

See the job log for details.

@clickhouse-gh

clickhouse-gh Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 37 queries analysed

This PR changes MergeTree merged part-offset packing (adding a consecutive-run page representation in MergedPartOffsets.h), plus unit tests and a text-index merge performance test — all confined to the merge path. Neither flagged query exercises that code: TPC-H Q1 (scan + aggregation) and Q7 (join + aggregation) run read-side SELECTs with no merges involved, so the reported +32.0% (Q1) and +20.5% (Q7) cannot plausibly be caused by this diff. Q1 is additionally an intrinsically noisy query. Both flagged regressions are downgraded to not-sure as off-path run-to-run variance.

clickbench

🟢 No significant changes

tpch_adapted_1_official

⚠️ 2 inconclusive

Flagged queries (2 of 22)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
⚠️ 1 not_sure 50 66 +32.0% <0.0001 This PR only touches merged part-offset packing (MergeTree merge path) and a text-index merge perf test; it does not touch the TPC-H Q1 scan/aggregation hot path. This query is also intrinsically noisy, so the +32.0% delta reads as run-to-run variance.
⚠️ 7 not_sure 73 88 +20.5% <0.0001 The diff changes MergedPartOffsets packing during merges plus a text-index merge test, none of which run in a TPC-H Q7 join/aggregation SELECT. The consistent +20.5% cannot be attributed to this PR and reads as environment variance.

Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

Debug info
  • StressHouse run: f87bd950-c524-489a-bb88-f27803decb2f
  • MIRAI run: b66f2e68-fbdb-453a-91d3-30164746ba9e
  • PR check IDs:
    • clickbench_963098_1789865210
    • clickbench_963104_1789865210
    • clickbench_963110_1789865210
    • tpch_adapted_1_official_963120_1789865210
    • tpch_adapted_1_official_963132_1789865210
    • tpch_adapted_1_official_963168_1789865210

@CurtizJ CurtizJ self-assigned this Sep 19, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 0171b85

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Performance Comparison (arm_release, master_head, 5/6) job-level red with no failed test row: harness verdict 10 errors, 1 too long, 1 unstable, the run-errors fall-through signature, plus one unstable unrelated query (join_convert_to_fixed_hash_table #26). In the last 48h that shard red on 212 of 568 PR runs and 17 of 64 master runs fixing PR #116491 (mine, open)
Mergeable Check, PR aggregators, red only because of the shard above fixing PR #116491 (mine, open)

154 checks pass, 19 skipped. The perf test this PR targets, text_index_merge, ran in shard
3/6 on both arches with every row success, so the firing and non-firing part layouts were
both measured.

Session id: cron:clickhouse-premium-slot-25:20260919-155700

alexey-milovidov and others added 2 commits September 19, 2026 20:42
A page whose merged offsets are consecutive is now stored as its first value plus
a count, with nothing bit-packed and no arena allocation, and read back as
min_val + i. flush() recognizes such a page by back() - front() == size() - 1,
which is exact for a strictly increasing sequence: the span is at least size() - 1,
with equality only when the values are consecutive. The state it stores,
bits_per_val == 0 with no compressed data, is the one master's single-value page
already used, so Page gains no field, keeps sizeof 32 and stays trivially
copyable for PODArray, and the new branch subsumes the size() == 1 case rather
than sitting next to it. In the reader the existing i == 0 return is reused, so
the decode path gains one comparison and no new branch, since min_val + 0 is
min_val for a packed page too.

Per page rather than per map, which is what the review on the PR asked for: a part
disjoint from the others apart from a few interleaved rows previously lost the
fast path entirely, although a break can spoil only the one page holding it.
Because consecutiveness is now a local property of the values in a page,
evaluated on those values at flush time, no merge semantics, part ordering or
mutation can make it lie, and both consumers of the map benefit without being
able to disagree.

The map-level flag added by the previous commit is therefore removed: it is
redundant (pages[p].min_val + page_idx == first_value + i) and measured no faster
on any fixture, the best point estimate being -2.5% with a 95% CI of
[-5.6%, +0.5%].

Measured with OPTIMIZE ... DRY RUN PARTS over the fixtures of
tests/performance/text_index_merge.xml, optimized builds, 16 paired repetitions
with the arm order rotated across four positions, an A/A null subtracted. Against
master: -9.7% and -8.3% on parts over disjoint key ranges, -9.0% and -6.9% on the
new mostly-disjoint layout, -8.4% and -9.4% on the multiblock fixtures, all six
95% CIs excluding 0. Against the previous head the mostly-disjoint layout gains
-7.6% and -7.1% and every other fixture's CI includes 0. Of the four fully
interleaved fixtures, where no page is consecutive, three show no measurable
change and multiblock with posting_list_codec = 'none' is +3.0% [+0.1%, +5.9%],
which the previous head already paid at +2.8%. CPU time moves with wall clock.

The produced index is byte-identical over six part layouts (disjoint, fully
interleaved, mixed, mostly disjoint, single part and a table without a sorting
key): all 125 files of the merged parts, 36 of them skp_idx_*, equal pristine
master's. A full consecutive page also stops costing 1280 bytes of arena per 1024
rows.

The performance test gains the mostly-disjoint layout in its vocabulary family,
which no existing fixture expressed: CI had only fully disjoint parts, where the
fast path fires for every page, and fully intersecting ones, where it fires for
none. Two gtests cover a map whose pages disagree and a page that is consecutive
except for its last step.

Related: ClickHouse#120802
@groeneai groeneai changed the title Skip decoding a packed page when a part's merged offsets are consecutive Skip packing and decoding pages of a part's merged offsets that are consecutive Sep 19, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (per-page round) (click to expand)

Pre-publication review of the per-page commit by an independent model (engine: codex, delta re-review) plus
my own cold review of the resulting code, written before reading any implementation evidence. One fix round
was bounced and every item below is resolved in the commit being published. Neither pass found a defect in
the mechanism: the predicate is exact by construction, and because it is decided on the values in a page at
the moment that page is built, no merge semantics, part ordering, row dropping or mutation can make it lie.
The strictly increasing input it rests on is structural, not asserted: MergedPartOffsets::insert feeds each
map a subsequence of a globally monotone counter.

Worth stating plainly rather than burying: moving the test into Page::operator[] gives the decode path one
extra comparison, so a layout where no page is ever consecutive pays for it. Of the four fully interleaved
fixtures, three show no measurable change and multiblock with posting_list_codec = 'none' is
+3.0% [+0.1, +5.9] against master, which the previous head already paid at +2.8%. Against that: -8.3% to
-9.7% where pages are consecutive, and -6.9% to -9.0% on the mostly-disjoint layout this round adds.
Hoisting the dispatch out of the per-row loops would remove the cost, but its natural home is the batched
remap in #113856, so I did not prescribe an unmeasured redesign into an approved in-flight PR's files.

The byte-identity A-side is pristine master, not this branch's merge commit, whose tree already carries the
previous head's variant. "Equal to master's bytes" therefore means what it says.

# Sev Finding Verdict Evidence / action
1 ❌ The branch head had moved under the round: a Merge branch 'master' commit was pushed onto it, so the local branch and the PR had diverged AGREE Caught before any push. The work was re-applied on top of that commit, so it is preserved verbatim and the push stays a fast-forward. None of the three files this PR touches differs between the previous head and that merge, so it was a history divergence, not a content conflict.
2 ⚠️ The diff still changed insert() and the member block, which are exactly the two hunks #113856 edits in this header AGREE That strengthened assertion existed for the map-level flag this round removes. The per-page predicate needs only within-page monotonicity, which master's own assertion gives, and it cost an unconditional member store per inserted row in release builds, where chassert compiles away. Removed: insert() and the member block are byte-identical to master again, so the change is confined to Page and flush() and collides with nothing in #113856.
3 ⚠️ The draft description claimed the reader "replaces" the existing i == 0 test; bits_per_val == 0 || i == 0 keeps it and adds a comparison AGREE Corrected before the contract was frozen. It understated exactly the cost being weighed here.
4 💡 The changelog entry never said what improved, and said consecutive pages "no longer allocate" although every page is still appended to the page array AGREE Rewritten to lead with the effect, and narrowed to storage for packed values. The arena saving is real: a full packed page costs bits_per_val = 10 over 1023 values, 160 UInt64 or 1280 bytes; a consecutive page costs none.
5 💡 The issue relationship used Resolves #120802 rather than the form the pull request template prescribes AGREE Replaced with Closes: plus the full issue URL. Same auto-close semantics.
6 💡 bits_per_val == 1 is now unreachable, so flush()'s chassert(bits_per_val >= 1) is weaker than the real invariant, and MinimalBitWidth / VerySmallValues no longer reach the packed decoder AGREE A span of 1 forces exactly two values and therefore consecutiveness, so the packed path now implies bits_per_val >= 2. No coverage lost: both tests packed at width 3 under master, which ConsecutiveWithOneGap reproduces. Left alone as master's own lines.
7 💡 Every new unit test asserts value equality, so none would redden if the fast path stopped being selected AGREE Unavoidable for an optimization that is byte-identical by construction, so selection is measured rather than argued: 100% of pages affine on the fully disjoint layout, 97.4% on the new mostly-disjoint one (573 of 588 pages, the 15 packed ones exactly what the layout's arithmetic predicts), 0% on the fully intersecting twin. Four mutation arms all redden, one of them killed by the new ConsecutiveExceptLastValue alone. In tree the boundary is now guarded by three fixture families in tests/performance/text_index_merge.xml whose firing rates differ by construction, the mostly-disjoint one added here because nothing expressed a layout between 100% and 0%. If you want it pinned in a unit test too, the minimal form is an isConsecutive accessor; I left it out because it lands in the member block #113856 rewrites.
8 💡 The new fixture's comment says two interior rows of every range move to the next part; the least(..., 5) clamp keeps the last range's two rows where they are AGREE The description's wording is corrected to per boundary. The comment itself is left as it is rather than spending a round on four words; the layout and every number are unaffected, since that part instead receives two rows and still has exactly one packed page.

Severity: ❌ blocker / ⚠️ major / 💡 nit. Every finding was fixed or is noted above as not blocking; none was
overridden. The reviewed tree was not edited during review.

Session id: cron:clickhouse-review-slot-8:20260919-215000

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 7906c68

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Upgrade check (amd_release) / Error message in clickhouse-server.log Code: 344 ... Transactions require Keeper to advertise LIST_WITH_STAT_AND_DATA, FILTERED_LIST, MULTI_READ and CHECK_STAT, thrown by AsyncLoader::worker on the ATTACH of test_3.src. The check harness randomizes those Keeper feature flags off while transactions.xml is installed, so the server refuses the transactional table it is asked to load. Same signature on 50 distinct PRs and 0 master rows over 14 days, onset 2026-09-18 12:03Z #120932 (mine, open)
Build profile diff RuntimeError: CI logs cluster query failed, raised at ci/jobs/build_profile_diff_job.py:234 under compare_symbols: the binary_symbols read against the CI logs cluster failed and the job aborts instead of skipping. Independent of branch content #118708 (mine, open)
Performance Comparison (amd_release, master_head, 1/6) / math_exp #5, order_by_read_in_order #1 Shard summary is 1 faster, 2 slower; 1 confirmed regression(s) on the performance dashboard. Neither query reads a text index, which is all this diff changes: order_by_read_in_order #1 is called slower on 249 distinct PRs and 57 master rows over 14 days, math_exp #5 on 7 PRs. Every text_index* query on this head, including the text_index_merge case this PR adds, is success in all six shards of both architectures #121090 (mine, open)
Performance Comparison (arm_release, master_head, 3/6) Shard summary is 7 too long; 1 confirmed regression(s) on the performance dashboard, and no query in the shard is called slower or unstable at all, so the dashboard verdict is the whole red. Over 7 days every one of the 187 shards whose summary carries confirmed regression is red, while shards saying unstable without it are green in 9889 of 10112 runs #121090 (mine, open)

Mergeable Check and PR are the workflow aggregators of the rows above.

Session id: cron:our-pr-ci-monitor:20260920-113109

@CurtizJ

CurtizJ commented Sep 20, 2026

Copy link
Copy Markdown
Member

There is a small performance improvement (5-10%).

Screenshot 2026-09-20 at 15 42 00

@CurtizJ
CurtizJ added this pull request to the merge queue Sep 20, 2026
Merged via the queue into ClickHouse:master with commit 827b4f0 Sep 20, 2026
172 of 177 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 20, 2026
@clickhouse-gh clickhouse-gh Bot added comp-merges Merges of data parts: choosing what to merge (merge selectors, merge predicates, part collectors)... and removed comp-mergetree MergeTree* family: parts, merges, primary index, column statistics, background data transformation. labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-merges Merges of data parts: choosing what to merge (merge selectors, merge predicates, part collectors)... groeneai-origin-issue PR origin: picked up an external GitHub issue pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

4 participants