Repository navigation
Fix Upgrade check errors from the empty part left by DETACH PART in 04653 - #125293
Merged
PedroTadim merged 2 commits intoNov 12, 2026
Merged
Conversation
…in `04653` `DETACH PART` leaves an empty covering part with the column list from before the `RENAME COLUMN b TO d`. Its directory stays on disk for `old_parts_lifetime` after cleanup outdates it, so a server restart within that time loads it as active, and its mutation fails on `b` with `UNKNOWN_IDENTIFIER` until cleanup drops it. `old_parts_lifetime = 0` removes it in the `DETACH PART` itself. Closes: ClickHouse#120975 CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=118242&sha=28503f108eeecbd23581117b0f8117a33fd3e8ce&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29 PR: ClickHouse#118242 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [219f26c] Summary: ✅ AI ReviewSummaryThis PR hardens Final Verdict
|
The rest of the section passes whether or not `old_parts_lifetime = 0` is set, so nothing here would notice if that part started surviving again - which is the whole failure this test is the carrier for. Assert it directly instead. `StorageMergeTree::dropPart` ends with a synchronous `clearOldPartsFromFilesystem`, so with `old_parts_lifetime = 0` the covering part is removed inside the `DETACH PART` statement and the assertion needs no waiting. Without the setting the count is 1: the part survives a restart, is loaded as active, and its mutation fails on the renamed-away `b`, which is the `UNKNOWN_IDENTIFIER` burst `Upgrade check` reported. Not filtered on `active` on purpose - the part is inactive, and the inactive-on-disk one is exactly what gets revived.
This was referenced Oct 12, 2026
This was referenced Oct 13, 2026
Merged
This was referenced Oct 14, 2026
Open
1 of 19 tasks
Member
|
@tiandiwonder can we merge this soon? |
This was referenced Oct 31, 2026
Contributor
Author
@PedroTadim would you please review? |
PedroTadim
approved these changes
Nov 12, 2026
This was referenced Nov 15, 2026
Member
|
backporting to fix CI |
clickhouse-gh Bot
added a commit
that referenced
this pull request
Nov 19, 2026
Backport #125293 to 26.10: Fix `Upgrade check` errors from the empty part left by `DETACH PART` in `04653`
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.
Closes: #120975
Related: #118499
Upgrade check (amd_release)fails on its server log scan with a burst ofUNKNOWN_IDENTIFIERerrors fromMutatePlainMergeTreeTask, all fromt_stale_part_type_5in04653_mutation_rewrite_stale_part_column_type. Example: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=118242&sha=28503f108eeecbd23581117b0f8117a33fd3e8ce&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29 (PR #118242).DETACH PARTleaves an empty part covering the detached one, with the column list from before theRENAME COLUMN b TO d. Cleanup outdates it right away, but its directory stays on disk forold_parts_lifetime. When the upgrade check restarts the server within that time, the part is loaded as active, mutation scheduling picks it up beforeclearEmptyPartsmay run, and the mutation fails onbuntil cleanup drops the part.Setting
old_parts_lifetime = 0on this table removes the empty part from disk in theDETACH PARTitself. Checked locally with the restart added after the test's statements: with the default setting the empty part survives and the restart logs 42UNKNOWN_IDENTIFIERerrors; with the setting it is gone before the restart and nothing is logged. The test output still matches the reference.Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/125293]
Version info
26.11.1.2077-master(included in26.11and later)26.10.7.25