Skip to content

Reset adopted part level to 0 on cross-engine ATTACH/CLONE/MOVE PARTITION - #107481

Merged
alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:fix-106798-reset-adopted-part-level
Jun 15, 2026
Merged

alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:fix-106798-reset-adopted-part-level

Conversation

@groeneai

@groeneai groeneai commented Jun 15, 2026 •

Copy link
Copy Markdown
Collaborator

Closes: #106798

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):

Fixed SELECT ... FINAL and OPTIMIZE TABLE ... FINAL returning duplicate rows after CREATE TABLE ... CLONE AS, ATTACH PARTITION ... FROM or MOVE PARTITION ... TO TABLE adopted parts from a plain MergeTree into a ReplacingMergeTree, SummingMergeTree or AggregatingMergeTree. The adopted part's merge level is now reset to 0 when the source and destination engines differ, so the destination deduplicates it on the next merge.

Description

A part adopted via CLONE AS, ATTACH/REPLACE PARTITION ... FROM or MOVE PARTITION ... TO TABLE kept the source part's merge level. A lone part at level greater than 0 is treated by FINAL/OPTIMIZE as already fully merged, so the row-collapsing transform of ReplacingMergeTree/SummingMergeTree/AggregatingMergeTree is skipped. When the source is a plain MergeTree (no row collapsing on merge), such a part still holds duplicate ORDER BY keys, so they survived SELECT ... FINAL and OPTIMIZE TABLE ... FINAL.

The fix resets the adopted part's level to 0 when the destination merge mode differs from the source's, so the destination re-merges the part under its own semantics. Same-engine adoption keeps the level unchanged, preserving the existing optimize_on_insert behavior (test 03283_optimize_on_insert_level) and avoiding a pointless re-merge. Applied at the four part-adoption sites in StorageMergeTree and StorageReplicatedMergeTree (replace and move partition) through a shared helper.

This implements the approach picked by tuanpach in the issue discussion (reset level to 0 only when source and target engines differ).

Reproduction (now returns 1 on patched server, returned 2 before):

CREATE TABLE t_mt (a UInt32, b UInt32) ENGINE = MergeTree ORDER BY a;
INSERT INTO t_mt VALUES (1, 10);
INSERT INTO t_mt VALUES (1, 20);
OPTIMIZE TABLE t_mt FINAL;
CREATE TABLE t_rmt CLONE AS t_mt ENGINE = ReplacingMergeTree;
SELECT count() FROM t_rmt FINAL;

Version info

  • Merged into: 26.6.1.835 (included in 26.6 and later)
  • Backported to: 26.5.6.40, 26.4.5.127, 26.3.17.44

…TION

CLONE AS, ATTACH/REPLACE PARTITION FROM and MOVE PARTITION TO TABLE adopt
the source part keeping its merge level. A lone part at level > 0 is treated
by FINAL and OPTIMIZE as already fully merged, so the row-collapsing transform
of ReplacingMergeTree/SummingMergeTree/AggregatingMergeTree is skipped. When
the source is a plain MergeTree (no row collapsing on merge), such a part still
contains duplicate ORDER BY keys, so the rows survive SELECT ... FINAL and
OPTIMIZE TABLE ... FINAL (issue ClickHouse#106798).

Reset the adopted part's level to 0 when the destination merge mode differs
from the source's. The destination then re-merges the part under its own
collapsing semantics on the next FINAL/OPTIMIZE. Same-engine adoption keeps
the level unchanged, preserving the existing optimize_on_insert behavior
(test 03283_optimize_on_insert_level) and avoiding a pointless re-merge.

The reset is applied at the four part-adoption sites in StorageMergeTree and
StorageReplicatedMergeTree (replace and move partition) via a shared helper.

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

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate

# Question Answer
a Deterministic repro? Yes. CREATE TABLE t_mt ... MergeTree; INSERT (1,10); INSERT (1,20); OPTIMIZE FINAL; CREATE TABLE t_rmt CLONE AS t_mt ENGINE=ReplacingMergeTree; SELECT count() FROM t_rmt FINAL returns 2 every time on the unpatched binary (cloned part lands at level 1). Same for ATTACH/MOVE PARTITION ... FROM and for SummingMergeTree/AggregatingMergeTree.
b Root cause explained? The adoption paths build dst_part_info with src_part->info.level and commit via fillNewPartName, which does not touch the level, so a source part at level>0 lands on the destination still at level>0. FINAL drops the merging transform for a lone level>0 part (ReadFromMergeTree.cpp no_merging_final), and a merge never re-collapses within a single non-level-0 part, so duplicate ORDER BY keys from a plain-MergeTree source survive on a collapsing-engine destination.
c Fix matches root cause? Yes. The level is reset to exactly 0 at the four adoption sites when the destination merge mode differs from the source's, so FINAL keeps the collapsing transform and OPTIMIZE re-merges+collapses the part. Targets the level-assignment mechanism directly, not a symptom.
d Test intent preserved / new tests added? New test 04001_attach_clone_part_level_reset covers CLONE AS, ATTACH PARTITION FROM and MOVE PARTITION TO TABLE into RMT/SMT/AMT, plus a same-engine control that asserts the level is preserved. Existing 03283_optimize_on_insert_level (same-engine DETACH/ATTACH) still passes unchanged.
e Both directions demonstrated? Yes, on Build-ID-verified binaries. Unpatched (19182eeb...): test FAILS (clone level 1, FINAL=2, summing keeps 2 rows). Patched (217e4839...): test PASSES (level 0, FINAL=1, summing=30), 5/5 deterministic; 03283 still green.
f Fix is general, not a narrow patch? Yes. The bug is symmetric, so all four part-adoption sites are fixed: StorageMergeTree::replacePartitionFrom/movePartitionToTable and StorageReplicatedMergeTree::replacePartitionFromImpl/movePartitionToTable, via one shared getLevelForAdoptedPart helper. Other cloneAndLoadDataPart callers (mutations, replica fetch) are same-table operations and correctly unaffected. Not a defensive guard: it corrects the level at the point where the part is adopted.

Session id: cron:clickhouse-worker-slot-1:20260615-074100

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @alesapin @CurtizJ — could you review? Resets an adopted part's merge level to 0 when source and destination engines differ (CLONE AS / ATTACH / MOVE PARTITION FROM a plain MergeTree into RMT/SMT/AMT), so FINAL/OPTIMIZE deduplicate it instead of skipping the lone level>0 part. Implements the approach tuanpach picked on #106798.

@clickhouse-gh

clickhouse-gh Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b4c29e4]

Summary: ✅


AI Review

Summary

The PR fixes adopted MergeTree parts retaining a non-zero merge level after CLONE AS, ATTACH / REPLACE PARTITION ... FROM, or MOVE PARTITION ... TO TABLE into tables whose merge semantics differ. The current implementation compares the full MergingParams merge semantics before preserving the level, includes the Graphite aggregate-parameter comparison needed by that check, and adds focused regression coverage for the original and follow-up cases. I found no unresolved blockers or major issues in the current code.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 15, 2026
Comment thread src/Storages/MergeTree/MergeTreeData.h Resolved
The previous commit reset an adopted part's level only when the merge
mode differed between source and destination. checkStructureAndGetMergeTreeData
does not compare MergingParams, so two same-mode tables can still differ in
semantic fields that feed the merge transforms (sign_column, is_deleted_column,
columns_to_sum, version_column, allow_tuple_element_aggregation, graphite_params).

ATTACH PARTITION FROM between e.g. two SummingMergeTree tables with different
columns_to_sum then kept a level>0 source part that the destination treats as
already-merged under its own columns_to_sum, so FINAL/OPTIMIZE leave rows that
should have been summed or dropped.

Preserve the source level only when the full merge semantics match (new
MergingParams::hasSameMergeSemantics), and reset to 0 otherwise. Resetting is
always safe: it makes the destination re-merge the lone part under its own
semantics. Same-engine same-params attach is unchanged, so the optimize_on_insert
signal (03283_optimize_on_insert_level) and a pointless re-merge are both avoided.

Adds operator== for Graphite::Params (used by the comparison) and same-mode/
different-params regression cases (SummingMergeTree differing columns_to_sum,
ReplacingMergeTree differing is_deleted_column).

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

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate (commit d3f9030 — full merge semantics)

# Question Answer
a Deterministic repro? Yes. SummingMergeTree(b) with rows (1,5,7),(2,9,0), OPTIMIZE FINAL (level 2), then ATTACH PARTITION tuple() FROM into SummingMergeTree(c): pre-fix the part stays level 2 and OPTIMIZE TABLE dst FINAL SETTINGS optimize_skip_merged_partitions=1 leaves (2,9,0) (should be dropped, c=0). Also ReplacingMergeTree(ver) -> ReplacingMergeTree(ver, del): pre-fix level stays 2, FINAL does not apply the destination is_deleted cleanup.
b Root cause explained? checkStructureAndGetMergeTreeData does not compare MergingParams, so a part can be adopted between same-mode tables that differ in columns_to_sum / is_deleted_column / version_column / sign_column / allow_tuple_element_aggregation / graphite_params. The previous fix preserved the source level whenever mode matched, so the destination treats a level>0 part merged under the source's (different) semantics as already-merged and FINAL/OPTIMIZE skip it.
c Fix matches root cause? Yes. Level is preserved only when the FULL merge semantics match (MergingParams::hasSameMergeSemantics compares mode + every merge-affecting field; added operator== for Graphite::Params). Any mismatch resets to 0. Resetting is always safe (forces a correct re-merge); preserving is the optimization, now gated on identical semantics.
d Test intent preserved / new tests added? Added same-mode/different-params regression cases to 04001_attach_clone_part_level_reset (SummingMergeTree differing columns_to_sum with the all-zero-drop divergence; ReplacingMergeTree differing is_deleted_column). Existing cases and the same-engine control are unchanged.
e Both directions demonstrated? Yes. New cases FAIL on the old mode-only binary (level 2, stale (2,9,0) row survives) and PASS on the fixed binary (level 0, row dropped), verified by rebuilding both binaries and diffing. 5/5 deterministic on the fix.
f Fix is general, not a narrow patch? Yes. The comparison is centralized in one helper used by all four adoption sites (replacePartitionFrom / movePartitionToTable on both StorageMergeTree and StorageReplicatedMergeTree). It covers every MergingParams field, not just the two in the reported example. Same-engine same-params attach is unaffected, so 03283_optimize_on_insert_level and related part-manipulation tests (03013, 02888, 00626) still pass.

Session id: cron:clickhouse-worker-slot-2:20260615-092500

Pattern::operator== compared only function->getName(), but Pattern::updateHash
hashes both the name and function->getParameters(). Two GraphiteMergeTree configs
with the same aggregate function name but different parameters (e.g. quantile(0.5)
vs quantile(0.9)) therefore compared equal, so MergingParams::hasSameMergeSemantics
would treat them as identical. A level>0 part adopted via ATTACH PARTITION FROM /
CLONE AS between such tables would keep its merge level and the destination would
skip the rollup under its own parameters (follow-up to issue ClickHouse#106798).

Compare getParameters() too, keeping operator== in lockstep with updateHash, and
add a GraphiteTest unit case covering same-name/different-parameters.

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

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate (follow-up: Graphite Pattern::operator== / commit b4c29e4)

# Question Answer
a Deterministic repro? Yes. Unit test: build two Graphite::Params from configs with quantile(0.5) and quantile(0.9); quantile_50 == quantile_90 returns true on the prior binary. Deterministic, no randomization.
b Root cause explained? MergingParams::hasSameMergeSemantics compares graphite_params via Graphite::Params::operator==, which compares patterns via Pattern::operator==. Pattern::operator== compared only function->getName(), while Pattern::updateHash hashes both getName() and getParameters(). So same-name/different-parameter aggregate functions compared equal, hasSameMergeSemantics returned true, and an adopted level>0 GraphiteMergeTree part kept its level and was skipped by the destination rollup under different parameters.
c Fix matches root cause? Yes. Pattern::operator== now also compares function->getParameters(), the exact data updateHash hashes. Not a guard or a workaround; it closes the equality/hash mismatch directly.
d Test intent preserved / new tests added? New unit case GraphiteTest.testParamsEqualityComparesFunctionParameters asserts quantile(0.5) == quantile(0.5), quantile(0.5) != quantile(0.9), quantile(0.5) != max. Existing GraphiteTest cases unchanged and still pass.
e Both directions demonstrated? Yes (Build-ID verified). Name-only operator== binary: new test FAILS (quantile_50 == quantile_90 is true). Fixed binary: all 4 GraphiteTest cases PASS.
f Fix is general, not a narrow patch? Yes. The fix is at the comparator that all MergingParams graphite comparisons funnel through, so every adoption path (ATTACH/CLONE/MOVE PARTITION) is covered. Audited the sibling fields: the other MergingParams members (columns_to_sum, version_column, sign_column, is_deleted_column, allow_tuple_element_aggregation) are plain values already compared by value in hasSameMergeSemantics; graphite_params was the only one delegating to a comparator that diverged from its hash. No regression: 03283_optimize_on_insert_level, 04001_attach_clone_part_level_reset (20/20), 03013, 02888, 00626 all pass.

Session id: cron:clickhouse-worker-slot-2:20260615-105600

@clickhouse-gh

clickhouse-gh Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.10% 85.10% +0.00%
Functions 92.30% 92.30% +0.00%
Branches 77.30% 77.30% +0.00%

Changed lines: Changed C/C++ lines covered by tests: 63/67 (94.03%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 18 line(s) · Uncovered code

Full report · Diff report

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI fully finished on HEAD b4c29e4d (Finish Workflow SUCCESS). No PR-caused failures. The only reds are the standard Bugfix validation stress meta-rows (OOM in dmesg / Lost s3 keys / Exception in test runner), infra-harness noise unrelated to the part-level-reset change. Both clickhouse-gh[bot] change requests (full MergingParams comparison, then Graphite Pattern getParameters) are addressed and re-verified both directions.

Session: cron:our-pr-ci-monitor:20260615-160000

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Jun 15, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jun 15, 2026
Merged via the queue into ClickHouse:master with commit ff1ee02 Jun 15, 2026
166 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 15, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jun 20, 2026
…use#107551)

Add a new DDL to change a MergeTree-family table's engine in place, e.g.
plain MergeTree -> ReplacingMergeTree / SummingMergeTree / CollapsingMergeTree /
VersionedCollapsingMergeTree / AggregatingMergeTree / GraphiteMergeTree. Only the
merge semantics (MergingParams) change; ORDER BY / PARTITION BY / PRIMARY KEY /
SAMPLE BY / columns are untouched.

Syntax: ALTER TABLE t MODIFY ENGINE = ReplacingMergeTree(version). A required
column for the target engine (Collapsing sign, VersionedCollapsing sign+version)
may be added in the same statement, before the MODIFY ENGINE command:
  ALTER TABLE t ADD COLUMN sign Int8, MODIFY ENGINE = CollapsingMergeTree(sign).

Gated behind the experimental setting allow_experimental_alter_modify_engine.
The new engine must be the same replication kind and a MergeTree-family engine;
the resulting MergingParams is validated against the columns.

The new ENGINE clause is persisted into the table's CREATE query; the new merge
semantics take effect when the storage is next constructed (DETACH/ATTACH or
restart). A safe immediate live swap of the read-lock-free merging_params (via
MultiVersion or storage recreation) and the coordinated Replicated*MergeTree path
are follow-ups; Replicated tables are rejected for now.

Reuses the part-level-reset rationale of ClickHouse#107481 conceptually (existing parts keep
their data and re-merge under the new semantics on FINAL/OPTIMIZE).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 4, 2026
…use#107551)

Add a new DDL to change a MergeTree-family table's engine in place, e.g.
plain MergeTree -> ReplacingMergeTree / SummingMergeTree / CollapsingMergeTree /
VersionedCollapsingMergeTree / AggregatingMergeTree / GraphiteMergeTree. Only the
merge semantics (MergingParams) change; ORDER BY / PARTITION BY / PRIMARY KEY /
SAMPLE BY / columns are untouched.

Syntax: ALTER TABLE t MODIFY ENGINE = ReplacingMergeTree(version). A required
column for the target engine (Collapsing sign, VersionedCollapsing sign+version)
may be added in the same statement, before the MODIFY ENGINE command:
  ALTER TABLE t ADD COLUMN sign Int8, MODIFY ENGINE = CollapsingMergeTree(sign).

Gated behind the experimental setting allow_experimental_alter_modify_engine.
The new engine must be the same replication kind and a MergeTree-family engine;
the resulting MergingParams is validated against the columns.

The new ENGINE clause is persisted into the table's CREATE query; the new merge
semantics take effect when the storage is next constructed (DETACH/ATTACH or
restart). A safe immediate live swap of the read-lock-free merging_params (via
MultiVersion or storage recreation) and the coordinated Replicated*MergeTree path
are follow-ups; Replicated tables are rejected for now.

Reuses the part-level-reset rationale of ClickHouse#107481 conceptually (existing parts keep
their data and re-merge under the new semantics on FINAL/OPTIMIZE).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 4, 2026
…use#107551)

Add a new DDL to change a MergeTree-family table's engine in place, e.g.
plain MergeTree -> ReplacingMergeTree / SummingMergeTree / CollapsingMergeTree /
VersionedCollapsingMergeTree / AggregatingMergeTree / GraphiteMergeTree. Only the
merge semantics (MergingParams) change; ORDER BY / PARTITION BY / PRIMARY KEY /
SAMPLE BY / columns are untouched.

Syntax: ALTER TABLE t MODIFY ENGINE = ReplacingMergeTree(version). A required
column for the target engine (Collapsing sign, VersionedCollapsing sign+version)
may be added in the same statement, before the MODIFY ENGINE command:
  ALTER TABLE t ADD COLUMN sign Int8, MODIFY ENGINE = CollapsingMergeTree(sign).

Gated behind the experimental setting allow_experimental_alter_modify_engine.
The new engine must be the same replication kind and a MergeTree-family engine;
the resulting MergingParams is validated against the columns.

The new ENGINE clause is persisted into the table's CREATE query; the new merge
semantics take effect when the storage is next constructed (DETACH/ATTACH or
restart). A safe immediate live swap of the read-lock-free merging_params (via
MultiVersion or storage recreation) and the coordinated Replicated*MergeTree path
are follow-ups; Replicated tables are rejected for now.

Reuses the part-level-reset rationale of ClickHouse#107481 conceptually (existing parts keep
their data and re-merge under the new semantics on FINAL/OPTIMIZE).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 8, 2026
…use#107551)

Add a new DDL to change a MergeTree-family table's engine in place, e.g.
plain MergeTree -> ReplacingMergeTree / SummingMergeTree / CollapsingMergeTree /
VersionedCollapsingMergeTree / AggregatingMergeTree / GraphiteMergeTree. Only the
merge semantics (MergingParams) change; ORDER BY / PARTITION BY / PRIMARY KEY /
SAMPLE BY / columns are untouched.

Syntax: ALTER TABLE t MODIFY ENGINE = ReplacingMergeTree(version). A required
column for the target engine (Collapsing sign, VersionedCollapsing sign+version)
may be added in the same statement, before the MODIFY ENGINE command:
  ALTER TABLE t ADD COLUMN sign Int8, MODIFY ENGINE = CollapsingMergeTree(sign).

Gated behind the experimental setting allow_experimental_alter_modify_engine.
The new engine must be the same replication kind and a MergeTree-family engine;
the resulting MergingParams is validated against the columns.

The new ENGINE clause is persisted into the table's CREATE query; the new merge
semantics take effect when the storage is next constructed (DETACH/ATTACH or
restart). A safe immediate live swap of the read-lock-free merging_params (via
MultiVersion or storage recreation) and the coordinated Replicated*MergeTree path
are follow-ups; Replicated tables are rejected for now.

Reuses the part-level-reset rationale of ClickHouse#107481 conceptually (existing parts keep
their data and re-merge under the new semantics on FINAL/OPTIMIZE).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 14, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 14, 2026
PedroTadim added a commit that referenced this pull request Jul 14, 2026
…ison

`MergingParams::allow_tuple_element_aggregation` was added on master by a
separate Graphite PR that was not backported to this release branch, so the
`hasSameMergeSemantics` comparison introduced by #107481 fails to compile
here. Remove the comparison; the tuple-element-aggregation feature does not
exist on this branch.

Build failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110339&sha=df86ad95c545d0abe100a8a254dca04827cdcab4&name_0=BackportPR&name_1=Build%20%28amd_debug%29
Backport of #107481

Co-Authored-By: Claude Opus 4.8 <[email protected]>
PedroTadim added a commit that referenced this pull request Jul 14, 2026
…ison

`MergingParams::allow_tuple_element_aggregation` was added on master by a
separate Graphite PR that was not backported to this release branch, so the
`hasSameMergeSemantics` comparison introduced by #107481 fails to compile
here. Remove the comparison; the tuple-element-aggregation feature does not
exist on this branch.

Build failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110340&sha=b26cdd397e69be9461ba1611c22b492163a8b73f&name_0=BackportPR&name_1=Build%20%28amd_debug%29
Backport of #107481

Co-Authored-By: Claude Opus 4.8 <[email protected]>
PedroTadim added a commit that referenced this pull request Jul 14, 2026
…ison

`MergingParams::allow_tuple_element_aggregation` was added on master by a
separate Graphite PR that was not backported to this release branch, so the
`hasSameMergeSemantics` comparison introduced by #107481 fails to compile
here. Remove the comparison; the tuple-element-aggregation feature does not
exist on this branch.

Build failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110341&sha=eba67bc76fc4cca6ecc2baf858cd80d453796adb&name_0=BackportPR&name_1=Build%20%28amd_debug%29
Backport of #107481

Co-Authored-By: Claude Opus 4.8 <[email protected]>
PedroTadim added a commit that referenced this pull request Jul 15, 2026
Backport #107481 to 26.4: Reset adopted part level to 0 on cross-engine ATTACH/CLONE/MOVE PARTITION
PedroTadim added a commit that referenced this pull request Jul 15, 2026
Backport #107481 to 26.5: Reset adopted part level to 0 on cross-engine ATTACH/CLONE/MOVE PARTITION
PedroTadim added a commit that referenced this pull request Jul 15, 2026
Backport #107481 to 26.3: Reset adopted part level to 0 on cross-engine ATTACH/CLONE/MOVE PARTITION
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
…cross-engine ATTACH/CLONE/MOVE PARTITION
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
…cross-engine ATTACH/CLONE/MOVE PARTITION
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
…cross-engine ATTACH/CLONE/MOVE PARTITION
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 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-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.3-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLONE AS from MergeTree breaks FINAL & OPTIMIZE deduplication for ReplacingMergeTree, SummingMergeTree, AggregatingMergeTree

7 participants