Skip to content

Fix possible logical error "Unexpected substream ... for column ..." during bump of compatibility setting - #109496

Merged
alexey-milovidov merged 16 commits into
masterfrom
escape-variant-subcolumn-bidirectional-fallback
Aug 13, 2026
Merged

alexey-milovidov merged 16 commits into
masterfrom
escape-variant-subcolumn-bidirectional-fallback

Conversation

@Avogar

@Avogar Avogar commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix possible logical error "Unexpected substream ... for column ..." during bump of compatibility setting.

Version info

  • Merged into: 26.8.1.1366 (included in 26.8 and later)
  • Backported to: 26.7.4.33, 26.6.3.52, 26.5.7.55, 26.3.18.28

Previously `tryToChangeStreamFileNameSettingsForNotFoundStream` only
fell back from escaped to unescaped variant subcolumn filenames.
This meant a replica with `escape_variant_subcolumn_filenames=0`
could not read parts written by a replica with the setting enabled,
which is a problem in hydra groups where replicas share a Keeper
but may have different values of this compatibility setting during
a rollout.

Make the fallback bidirectional: toggle `escape_variant_substreams`
regardless of its current value so that both directions are tried
when the primary filename is not found in the part checksums.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@Avogar Avogar added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jul 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b7da162]

Summary: ✅


AI Review

Summary

This PR makes escape_variant_subcolumn_filenames compatibility handling bidirectional for Variant substreams, applies the same fallback to compact-part substream-existence probes and RENAME COLUMN, and adds focused regressions for wide, compact, and missing-columns_substreams.txt cases. I re-checked the current head against the existing review threads and do not see any remaining correctness gaps in the touched paths.

Final Verdict

Status: ✅ Approve

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.70% 86.80% +0.10%
Functions 92.00% 92.00% +0.00%
Branches 79.00% 79.10% +0.10%

Changed lines: Changed C/C++ lines covered: 49/51 (96.08%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jul 6, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

Updating the branch to fix the 04001_join_reorder_through_expression test, which was broken today in master.

Avogar and others added 2 commits July 7, 2026 18:56
…:ClickHouse/ClickHouse into escape-variant-subcolumn-bidirectional-fallback
…lumn_filenames`

`collectFilesForRenames` used `getStreamNameOrHash` (no fallback) to
resolve source stream filenames during `RENAME COLUMN`. When a wide
part was written with a different `escape_variant_subcolumn_filenames`
value than the current setting, the lookup silently failed and the
rename was skipped, leaving mismatched filenames and metadata in the
mutated part.

Switch to `getStreamNameForColumn`, which already includes the
bidirectional fallback via `tryToChangeStreamFileNameSettingsForNotFoundStream`,
matching how `DROP_COLUMN` resolves streams.

Add focused regression tests for `RENAME COLUMN` after toggling the
setting in both directions (0->1 and 1->0).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Comment thread src/Storages/MergeTree/MutateTask.cpp Resolved
Avogar and others added 4 commits July 8, 2026 12:23
…ile renames

Instead of enumerating substream paths via serialization (which
computes filenames from the current `escape_variant_subcolumn_filenames`
setting), iterate the source part's `columns_substreams.txt` entries
directly and apply `getFileNameForRenamedColumnStream` — the same
function `addRenamedColumnToColumnsSubstreams` uses. This keeps
file renames and `columns_substreams.txt` consistent regardless of
whether `escape_variant_subcolumn_filenames` differs between the
source part and the current setting.

Add `ColumnsSubstreams::tryGetColumnSubstreams` that looks up
substreams by column name so callers don't need to search for the
column position manually.

Fall back to the original `enumerateStreams` approach for old parts
without `columns_substreams.txt`.

Add a shell test that directly verifies .bin filenames on disk,
columns_substreams.txt content, and CHECK TABLE after RENAME COLUMN
with a flipped escape_variant_subcolumn_filenames setting in both
directions.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…hout `columns_substreams.txt`

When `columns_substreams.txt` is missing (old or corrupted parts), the
fallback path in `collectFilesForRenames` now uses
`getStreamNameForColumn` (with bidirectional fallback) instead of
`getStreamNameOrHash`. This ensures renames succeed even when the part
was written with a different `escape_variant_subcolumn_filenames` value.

Also adds test cases 3 and 4 to the shell test that exercise this
fallback by detaching the table, removing `columns_substreams.txt`,
re-attaching, flipping the escaping setting, and verifying rename works.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…with master

The branch and master both added an identical declaration of
`ColumnsSubstreams::tryGetColumnSubstreams`, and the merge kept both,
which broke the build in CI:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109496&sha=afcba83c0970b7ee66c676dd56875243d4f37c9e&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Fable 5 <[email protected]>
… on Linux

The test inspects the part directory on disk directly, so it only makes sense on
a plain local disk on Linux:

- On macOS the filesystem (APFS) is case-insensitive, which makes `MergeTree`
  hash stream filenames unconditionally (see `MergeTreeData::getFullNameForFile`),
  so the expected `v.Tuple(a UInt32, b UInt32)%2Ea.bin`-style names never appear
  and the test failed in `Fast test (arm_darwin)`. The pre-existing
  `03369_variant_escape_filename_merge_tree` is tagged `no-darwin` for the same
  reason.
- For object storage the local part directory holds metadata files rather than
  the data itself, so `cat columns_substreams.txt` printed blob metadata instead
  of the substream list, and removing that metadata file in cases 3 and 4 left
  the part unreadable. The test failed in every `s3 storage` / `azure` stateless
  run for this reason.

Mirror the tags used by the sibling tests that read part files directly
(`04093_rename_column_corrupts_columns_substreams`,
`04235_corrupted_columns_substreams_detection`).

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109496&sha=62eeb400eafe86cedff9b5a4e9a36aa722633cda
PR: #109496
@alexey-milovidov

Copy link
Copy Markdown
Member

Merged master, and fixed the only failure that belonged to this PR: the new test 04507_variant_escape_filename_rename_consistency inspects the part directory on disk directly, so it needs the no-darwin, no-object-storage, no-shared-merge-tree tags (on APFS MergeTree hashes stream filenames unconditionally, and for object storage the local part directory holds metadata files rather than the data). That accounted for the Fast test (arm_darwin) red and every s3 storage / azure stateless red.

The remaining failures in https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109496&sha=62eeb400eafe86cedff9b5a4e9a36aa722633cda are unrelated to this change:

@groeneai, two of the unrelated failures have no tracking issue - could you investigate them and provide fixes in separate PRs (or link the fixes if already in progress)?

  1. ThreadSanitizer: data race in Stress test (arm_tsan): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109496&sha=62eeb400eafe86cedff9b5a4e9a36aa722633cda&name_0=PR&name_1=Stress%20test%20%28arm_tsan%29 - the race is on the version flag in DataTypeAggregateFunction::setVersion (src/DataTypes/DataTypeAggregateFunction.h:83), reached from updateVersionFromRevision via setVersionToAggregateFunctions. Nothing in this PR touches aggregate function serialization versions.
  2. 03236_squashing_high_memory failing with ReplicatedDatabase DDL task ... is not finished on server under amd_llvm_coverage: it has failed on 21 distinct PRs/master runs in the last 45 days, so it is a pre-existing flake.

@groeneai

Copy link
Copy Markdown
Collaborator

Thanks for splitting these out. Answers below.

1. ThreadSanitizer: data race on DataTypeAggregateFunction::setVersion

Already tracked and fixed in #110997 (head 3cd48c678a4812, in CI). Same STID (3977-4818), and the 2026-07-19 arm_tsan hit on 62eeb400eafe that you linked is one of the three occurrences on that task. Root cause: the single shared const DataTypeAggregateFunction in the table's ColumnsDescription has its mutable std::optional<size_t> version written lazily without synchronization, so two concurrent Native-serializing SELECTs both reach setVersionToAggregateFunctions -> updateVersionFromRevision -> setVersion on the same object. It has since been seen on master too (2026-07-26, amd_tsan azure), not just in PRs.

2. 03236_squashing_high_memory / ReplicatedDatabase DDL task ... is not finished

Not a pre-existing flake, and not coverage-build noise. It is a regression with a sharp onset on 2026-07-19, and it is deterministic-ish rather than random.

Data, restricted to the exact signature (ReplicatedDatabase DDL task ... is not finished) over 365 days:

era hits distinct PRs window
before 2026-07-19 3 1 2026-03-19 .. 2026-04-10
since 2026-07-19 19 19 2026-07-19 07:19 .. 2026-07-24 17:34

All 19 are on one job, Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DBReplicated, WasmEdge, parallel, 2/3), all in PRs, none on master. The 21-runs-in-45-days figure mixes in older, unrelated dispositions (Test runs too long (> 180s) in a flaky check, ATTEMPT_TO_READ_AFTER_EOF, a server died), so the signature you are looking at is 19 hits in 6 days, not 21 in 45.

The onset is the duration of the test on that job, and it is not gradual. Median runtime of 03236_squashing_high_memory on that shard, OK rows only:

  • up to 2026-07-18: 125.4s (n=2473)
  • from 2026-07-19 12:00: 287.1s (n=1957)

Bisecting the master runs on that shard puts the step between two adjacent commits: 7361433d0f65 = 131.8s, then 4edafb579c70 = 279.3s, with every run before at 115-148s and every run after at 271-325s. It is specific to this test: on the same shard, over the same window, 03236_squashing_high_memory is the only test with nb > 200, na > 200 and a >1.5x median change. Other coverage shards are unchanged (amd_llvm_coverage, 2/3: 107.2s -> 106.6s), and the shard's own aggregate p50/p90 is flat, so this is not the runner getting slower.

That range contains exactly two merges: #100992 and #108048. #100992 only touches PartLoadingTree::add, which runs at table load, not on this populate, so the carrier is #108048.

The mechanism, from the job's own query_log artifact for the failing run (62eeb400eafe, database test_djg43cxr, DDL entry query-0000000005):

srv0 (initiator) QueryFinish  206.7s  written_rows=10000  read_rows=500000001
srv1             QueryFinish  165.9s  written_rows=10000  read_rows=500000001
srv2             QueryFinish  183.8s  written_rows=10000  read_rows=500000001
outer statement  ExceptionWhileProcessing 327.4s

All three replicas each scan the full 500,000,001 rows and each write the same 10000 rows. The initiator finishes its local execution at 14:55:55.132, the outer statement gives up at 14:57:55.798, i.e. exactly 120.7s later, against distributed_ddl_task_timeout = 120 from tests/config/users.d/database_replicated.xml. The replicas need 165.9s and 183.8s, so they cannot possibly land inside the window. That is why the message reports "0 of them are currently executing the task": by the time the initiator polls, they have not started yet, and the wait is spent queued behind the initiator's own 206s populate.

The relevant part of #108048 is that a plain CREATE TABLE ... AS SELECT on an Atomic database is now routed through doCreateOrReplaceTable (create temp, populate, publish by RENAME). The Replicated-database heavy-create guard in InterpreterCreateQuery.cpp:1884-1889 is

const bool allow_create_select_for_replicated
    = (create.isView() && !create.is_populate) || create.is_create_empty || !is_storage_replicated;

is_storage_replicated is false here (the test's target is a plain MergeTree, not ReplicatedMergeTree), so allow_create_select_for_replicated is true and the statement is replicated as one CREATE ... AS SELECT DDL entry that every replica re-executes in full, rather than being rejected or split. Before #108048 the same statement went down doCreateTable and the ordering was different; after it, the initiator's populate is serialized ahead of the replicas' and the total blows past 120s on the instrumented coverage build, where each populate costs ~1865s of user CPU with ~1246s of OSCPUWait on the initiator. On an uninstrumented build the same populate is fast (0.2s locally), which is why only the coverage shard fails: the coverage build is the only place where 3x the populate exceeds the timeout.

So it is neither of the two options you framed. There is no DDL-worker hang (the replicas execute correctly and the table ends up populated on all three), and the timeout is not merely too tight for a coverage build in general: the same job ran this test in 125s for months. The regression is that this statement now costs 3x the populate under Replicated database, plus a serialization that puts the initiator's populate outside the replicas' wait window.

I do not have a fix PR yet. I am investigating at full effort and I will post the fixing-PR link in this thread. Two candidate directions I am deciding between, and I want to name my uncertainty rather than guess: tightening allow_create_select_for_replicated so a plain CREATE ... AS SELECT that publishes via the temp-table path is not replicated as a heavy re-executed populate (the !is_storage_replicated escape looks like the wrong condition for the new path), versus restoring the pre-#108048 ordering for the Replicated-database case so the initiator does not consume the whole distributed_ddl_task_timeout before the replicas start. The first looks correct to me; the second is narrower. If you have a preference, that would save me a round.

Session id: cron:clickhouse-premium-slot-24:20260726-223253

@groeneai

Copy link
Copy Markdown
Collaborator

Item 2: 03236_squashing_high_memory timeout is a real 2.3x regression in CREATE ... AS SELECT on Replicated databases, and the fix needs your call

Root cause found and verified. I am not opening a PR yet because every in-scope fix I can construct either regresses a guarantee that works today or changes the replicated-DDL entry protocol, so I would rather have your decision first.

Signature. ReplicatedDatabase DDL task ... is not finished on 2 of 3 hosts, only on Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DBReplicated, WasmEdge, parallel, 2/3). Sharp onset 2026-07-19: 3 hits / 1 PR before, 19 hits / 19 distinct PRs after. 0 on master.

It is a duration step, and the control isolates it to the Replicated path. Median of 03236_squashing_high_memory, OK rows only:

shard before 07-19 after 07-19
amd_llvm_coverage ... DBReplicated ... 2/3 124.0s (n=4475) 287.1s (n=1984)
amd_llvm_coverage, non-Replicated (control) 113.9s (n=17724) 113.6s (n=6589)

3 replicas x ~96s serialized is ~288s, matching 287.1s. So it is not a runner or coverage change.

Mechanism. Carrier is #108048 (merge 696bbe0031dbca). On a Replicated database this statement is one DDL entry that every replica re-executes in full, and a replica blocks on the entry's ephemeral /try znode until the initiator commits its ZooKeeperMetadataTransaction (DatabaseReplicatedWorker.cpp:652-697). So the commit point decides when replicas may start.

Before #108048, createTable fell through to doCreateTable and the commit fired inside commitCreateTable (DatabaseAtomic.cpp:429-430), i.e. before the populate. The N populates overlapped, total ~1x.

After #108048, a plain CREATE ... AS SELECT routes through doCreateOrReplaceTable (InterpreterCreateQuery.cpp:1961-1968). Both writes there run on contexts for which isInternalSubquery() is true (create_context at :2385-2386, make_internal_context at :2424-2441), so neither guarded commit fires; the transaction is committed only by the fallback in DDLWorker::tryExecuteQuery (DDLWorker.cpp:593-597), after the populate and the rename. /try is held for the initiator's whole populate, so the per-replica populates now run strictly one after another. The initiator then waits a fresh distributed_ddl_task_timeout (120s in the CI profile) while replicas that need 165-183s have barely started.

Why I did not just move the commit earlier. The publishing RENAME re-attaches the same transaction object (:2434-2438, attach_existing=true), and that transaction is single-shot: addOp throws LOGICAL_ERROR once it is executed (DDLTask.h:248-253), and DatabaseReplicated::renameTable unconditionally adds ops (DatabaseReplicated.cpp:2568-2595). Committing early also publishes /committed together with a finished_node_path carrying ExecutionStatus(0), i.e. "finished successfully" (DDLWorker.cpp:736-737), while the final table does not exist yet, so a failed populate would leave committed _tmp_replace_* metadata and no final table. That is worse than the old behaviour.

Why I did not just exclude Replicated databases from the temp-table path. That reintroduces #26746 there. Today, when the populate fails the initial query rethrows (DDLWorker.cpp:603-604), the ephemeral /try holder is destroyed, and replicas skip the entry as uncommitted, so no orphan is left on any replica. Under the old path the entry is already committed, so every replica creates and keeps the empty orphan. It would also invert 04547_create_as_select_destination_not_visible_during_populate, which is untagged and currently passes on that exact shard (1689 OK / 0 FAIL over 6 days).

So atomic-publish-with-no-orphan and cross-replica populate concurrency cannot both hold without changing the entry protocol: the commit is simultaneously what makes the publish atomic and what releases the replicas.

Options, in my order of preference:

  1. Split the statement into two replicated log entries (create, then populate+publish), so the create commits promptly and replicas populate concurrently. Keeps both guarantees, but it is a protocol change in DatabaseReplicated and the largest diff.
  2. Allow two commits per entry for this path (commit the create, then a second transaction for the rename). Smaller, but it weakens the single-transaction invariant the is_create_or_replace_query flag exists to protect.
  3. Keep the current behaviour and treat the slowdown as accepted for Replicated databases, in which case 03236_squashing_high_memory needs a real remedy rather than a timeout bump, and the setting doc for database_replicated_allow_heavy_create ("can block DDL queue for a long time") now describes statements that never opted in.

I am happy to implement any of these. @alexey-milovidov which do you prefer?

@clickhouse-gh

clickhouse-gh Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.30% 86.30% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 78.40% 78.40% +0.00%

Changed lines: Changed C/C++ lines covered: 33/35 (94.29%) · Uncovered code

Full report · Diff report

…name_rename_consistency`

The test inspects the part directory directly: it lists the `.bin` files and reads
`columns_substreams.txt`. With packed part storage all of those live inside a single
blob, so no individual files exist on disk. CI randomizes
`min_bytes_for_full_part_storage` to a large value, which switches the parts to packed
storage and made the test fail in every stateless run:

    cat: .../all_1_1_0/columns_substreams.txt: No such file or directory

Pin the setting to its default `0` so the parts always use full storage.
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The only red, Stress test (arm_release), was an unrelated harness flake: the fail-close verification query in install_thread_pool_fault_injection timed out (receive_timeout=15) on the thread-fuzzed server right after SYSTEM RELOAD CONFIG, aborting the run before any tests ran. Nothing in the log touches Variant/substreams. Fix for the harness: #113248. Merged master (clean, build verified) to retrigger CI.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The only non-performance red on the last run, Build (arm_release), is unrelated to this PR: the build itself succeeded, but the Post Hooks build-profile telemetry INSERT into the shared CI logs cluster was rejected with Code 241 MEMORY_LIMIT_EXCEEDED. This has been failing fleet-wide (75–86% of all runs, PRs and master alike) since 2026-08-03 — tracked in #113408, mitigation in #113409 (retry the INSERT transport with backoff, as the read path already does). The Performance Comparison reds are all "unstable" classifications of decimal_aggregates and file_table_function, long-known noisy queries untouched by this PR.

Merged the latest master (clean merge, clickhouse target builds) and pushed to get a fresh run. No unresolved review threads; AI Review verdict is "No new findings". Still pending: green CI and a human merge.

Avogar and others added 2 commits August 11, 2026 19:19
…m probes

The compact reader's check_stream_exists_callback probed columns_substreams.txt
with the current escape_variant_subcolumn_filenames value only. For a compact part
written with the other value, an optional Variant substream (MapBucketIndexes of a
bucketed Map) was reported absent after the setting was flipped, so the reader took
the "no bucket index" path and reordered map elements.

Add a bidirectional tryGetSubstreamPosition overload on ColumnsSubstreams (mirroring
the existing getSubstreamPosition) that retries with the flipped setting, and use it
in both compact-reader probes.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing b7da162eb with master 0eb5eba20 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 7a49896f0; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 691.96 MiB 688.98 MiB -2.98 MiB (-0.43%)

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 units

282 translation units recompiled, 3467 s compile time in total, 282 of them have a recent master baseline.

Job report

@alexey-milovidov alexey-milovidov self-assigned this Aug 13, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Aug 13, 2026
Merged via the queue into master with commit cdfbf8f Aug 13, 2026
180 checks passed
@alexey-milovidov
alexey-milovidov deleted the escape-variant-subcolumn-bidirectional-fallback branch August 13, 2026 21:15
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 13, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Aug 13, 2026
clickhouse-gh Bot pushed a commit that referenced this pull request Aug 14, 2026
…tream ... for column ..." during bump of compatibility setting
clickhouse-gh Bot added a commit that referenced this pull request Aug 14, 2026
Backport #109496 to 26.7: Fix possible logical error "Unexpected substream ... for column ..." during bump of compatibility setting
alexey-milovidov added a commit that referenced this pull request Aug 14, 2026
Backport #109496 to 26.5: Fix possible logical error "Unexpected substream ... for column ..." during bump of compatibility setting
alexey-milovidov added a commit that referenced this pull request Aug 14, 2026
Backport #109496 to 26.3: Fix possible logical error "Unexpected substream ... for column ..." during bump of compatibility setting
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 14, 2026
clickhouse-gh Bot added a commit that referenced this pull request Aug 17, 2026
Backport #109496 to 26.6: Fix possible logical error "Unexpected substream ... for column ..." during bump of compatibility setting
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
…ected substream ... for column ..." during bump of compatibility setting
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
…ected substream ... for column ..." during bump of compatibility setting
VighneshPath pushed a commit to VighneshPath/ClickHouse that referenced this pull request Sep 16, 2026
…ected substream ... for column ..." during bump of compatibility setting
bytehalo-infra added a commit to sentioxyz/ClickHouse that referenced this pull request Sep 25, 2026
STOR: changing the `compatibility` setting (upgrade) -> exc LOGICAL_ERROR Unexpected substream.
Effect in the production build a394e92: wrong/failing (the upstream test fails on it and passes on official 26.8.8.8; evidence/fix_ci_20260925/upstream_repro/residual/109496.PROD263.txt).
Upstream patch unchanged, with its test(s): 04409_variant_escape_filename_fallback, 04507_variant_escape_filename_rename_consistency, 04839_variant_escape_filename_compact_map_buckets.
Depends on ClickHouse#109178 (26.3 backport ClickHouse#113094), applied before it as on the 26.3 branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bytehalo-infra added a commit to sentioxyz/ClickHouse that referenced this pull request Sep 25, 2026
Dependency of the ClickHouse#109496 backport (d56fb49): its MutateTask.cpp change calls
ColumnsSubstreams::tryGetColumnSubstreams, which this change adds, so d56fb49 does not
compile without it (found by a syntax check of every file the backports change). The 26.3
branch merged this backport on 2026-07-27, before the ClickHouse#109496 backport (2026-08-13).
Fix: a part produced by a mutation of a table with a Dynamic column could miss the
variant_discr stream (LOGICAL_ERROR on read); upstream patch unchanged, with its tests
04341, 04342, 04401 and 04412 (the local triage did not reproduce the first two on the
production build; the other two need a server).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants