Repository navigation
Throw BAD_ARGUMENTS, not LOGICAL_ERROR, for incompatible granularity in MOVE/REPLACE PARTITION - #110535
Conversation
…in MOVE/REPLACE PARTITION Reintroduces ClickHouse#103881 (reverted in ClickHouse#110526 because it broke the private CI). The regression test now carries the no-shared-merge-tree tag so its ReplicatedMergeTree assertions are not run under the Cloud SharedMergeTree substitution, which routes partition moves through a different code path. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Difference from the reverted #103881: the regression test now carries Session id: cron:clickhouse-worker-slot-0:20260715-110200 |
|
Workflow [PR], commit [55de501] Summary: ❌
AI ReviewSummaryThis PR reintroduces the Missing context / blind spots
Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 14/14 (100.00%) · Uncovered code |
CI finish ledger — 55de501CI fully finished (Finish Workflow pass, no checks pending). This PR reintroduces the reverted #103881 (BAD_ARGUMENTS instead of LOGICAL_ERROR for incompatible-granularity MOVE/REPLACE/ATTACH PARTITION + regression test 04150, now tagged
Every failure has an owner; none are PR-caused. Requesting private-CI verification before merge per @Algunenano's revert directive. Session id: cron:our-pr-ci-monitor:20260715-180000 |
|
Fixing PR for the The failure was code 241 with the server-total-RSS signature |
|
The Fixing PR: #110503 (retry functional tests on server |
|
CI finish ledger follow-up (covered SHA 55de501). The Stress-test Fixing PR: #109114 "Fix Block structure mismatch in JoinStep for decorrelated correlated subquery with duplicate column name" (merged 2026-07-17). Verified held on master: 0 hits for this signature since the merge (baseline was 12 hits / 11 distinct master SHAs in the 7 days before merge). Rebasing this PR past the merge picks up the fix. |
|
@groeneai Please merge master and run CI again |
b027830
|
Hi — this looks like a backport candidate for |
…ce-103881-move-partition-bad-args Throw BAD_ARGUMENTS, not LOGICAL_ERROR, for incompatible granularity in MOVE/REPLACE PARTITION
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
ALTER TABLE ... MOVE/REPLACE PARTITIONbetween two MergeTree tables with incompatible granularity (one adaptive, one non-adaptive) now throwsBAD_ARGUMENTSinstead ofLOGICAL_ERROR. This is a user-reachable condition, so it should not surface as an internal error (which aborts the server in debug/sanitizer builds).Description
Reintroduces #103881, which was reverted in #110526 because it broke the private CI.
MergeTreeData::canReplacePartitionrejects MOVE/REPLACE/ATTACH PARTITION when the source part'smark_type.adaptivedoes not match the destination'scanUseAdaptiveGranularity(). Any user can create two tables with differentindex_granularity_bytes/enable_mixed_granularity_partsand trigger a partition transfer between them, so the correct error code isBAD_ARGUMENTS. Three of the four call sites threwLOGICAL_ERROR; the fourth (StorageMergeTree::replacePartitionFrom) already threwBAD_ARGUMENTS. This aligns all four.Originally found by BuzzHouse (STID 4063-3b45) on
BuzzHouse (amd_tsan):https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=103862&sha=3bec163c6ba8dcb12ed1144c8ac75c261863cc81&name_0=PR&name_1=BuzzHouse%20%28amd_tsan%29
Difference from #103881 (private CI fix): the regression test
04150_move_partition_inconsistent_granularitynow carries theno-shared-merge-treetag. Under the Cloud/private SharedMergeTree substitution, ReplicatedMergeTree partition moves go through a different code path that does not hit thiscanReplacePartitiongranularity check, so the ReplicatedBAD_ARGUMENTSassertions do not hold there. The plain MergeTree cases still exercise the fix on every configuration. This is the most likely cause of the private-CI break; @Algunenano / @hanfei1991, please run private CI before merging to confirm.Version info
26.8.1.61(included in26.8and later)