Fix server crash when dropping a patch part after schema change#99036
Merged
Conversation
Contributor
|
Workflow [PR], commit [8826d16] Summary: ❌
|
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 100.00% (7/7) |
CurtizJ
approved these changes
Mar 17, 2026
Merged
via the queue into
ClickHouse:master
with commit Mar 17, 2026
08bd681
161 of 163 checks passed
robot-clickhouse
added a commit
that referenced
this pull request
Mar 17, 2026
… after schema change
clickhouse-gh Bot
added a commit
that referenced
this pull request
Mar 18, 2026
Backport #99036 to 25.8: Fix server crash when dropping a patch part after schema change
clickhouse-gh Bot
added a commit
that referenced
this pull request
Mar 18, 2026
Backport #99036 to 25.12: Fix server crash when dropping a patch part after schema change
clickhouse-gh Bot
added a commit
that referenced
this pull request
Mar 18, 2026
Backport #99036 to 26.1: Fix server crash when dropping a patch part after schema change
clickhouse-gh Bot
added a commit
that referenced
this pull request
Mar 18, 2026
Backport #99036 to 26.2: Fix server crash when dropping a patch part after schema change
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix server crash (std::terminate) when executing
ALTER TABLE ... DROP PARTon a patch part after a schema change (e.g. ADD COLUMN). The crash was caused by missing system columns (_part) in the emptycoverage part metadata, leading to an uncaught exception inside a NOEXCEPT_SCOPE.
Fixes #98484
Documentation entry for user-facing changes
No documentation changes needed. This is a bug fix for server crash when dropping patch parts.
Note
Medium Risk
Touches MergeTree patch-part metadata/key construction, which can affect part partitioning and operations if the injected columns list is incorrect; change is small and covered by a regression test.
Overview
Fixes a crash when dropping patch parts after a schema change by making
getPatchPartMetadata(ColumnsDescription, ...)always inject required patch-part system columns (e.g._part) before building the partition/sorting keys.Adds a stateless regression test that creates patch parts via lightweight delete, alters the table schema, then
DROP PARTon a patch part and verifies the server stays alive.Written by Cursor Bugbot for commit 8826d16. This will update automatically on new commits. Configure here.