Repository navigation
Conversation
These tests fabricate a rolled-back part by writing a raw txn_version.txt directly into the part directory (cp + printf), which is only valid on a local disk. On an object-storage disk a part-dir file must be DiskObjectStorageMetadata format, so the raw file fails to parse and part loading throws CORRUPTED_DATA (Code 246), which on a stress restart aborts server startup (Cannot start clickhouse-server). The no-object-storage tag only skips the object-storage runner modes (--s3-storage/--azure-blob-storage); it does not fire when the server's default disk is object-storage. Skip on any non-local disk instead. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-author-slot-2:20260719-134600 |
Internal second-model review — 1 finding, adjudicated (click to expand)An independent second model reviewed the diff before this PR was opened. Adjudication:
❌ Blockers: none. |
|
cc @tuanpach — could you review? These are the 4 |
|
Workflow [PR], commit [8581ba3] Summary: ❌
AI ReviewSummaryThis PR updates four PR Metadata
Findings💡 Nits
Final VerdictStatus: ✅ Approve |
…of skipping The four part_loading_tree_rollback tests (04063, 04241, 04417, 04500) fabricate a rolled-back part by writing a raw txn_version.txt into the part directory, which only parses on a local disk. The previous approach skipped the test when the active part was not on a Local disk, but that turns the PartLoadingTree::add regressions into OK no-ops on every stress run whose MergeTree default policy is object storage. Instead pin the CREATE TABLEs to the built-in local 'default' storage policy (as 04063_drop_detached_part_with_try_n_suffix.sh already does). The built-in 'default' policy is not overridden by the stress-only s3_storage_policy_for_merge_tree_by_default.xml (which only sets merge_tree/storage_policy), so the seeding part is always local and the raw txn_version.txt parses, keeping the coverage active in that environment instead of dropping it. Co-Authored-By: Claude Opus 4.8 <[email protected]>
| $CLICKHOUSE_CLIENT -q " | ||
| CREATE TABLE ${TABLE} (x UInt32) | ||
| ENGINE = MergeTree ORDER BY x | ||
| SETTINGS storage_policy = 'default' |
There was a problem hiding this comment.
The final fix here is different from what the PR metadata still describes. The title/body still say these tests are now skipped on non-local disks, but this change actually pins them to storage_policy = 'default' so the PartLoadingTree::add coverage keeps running under stress. Please update the title/description to match the implemented fix; otherwise reviewers are evaluating a superseded contract.
There was a problem hiding this comment.
Updated the title and description to match the implemented fix. Title is now "Pin part_loading_tree_rollback tests to the local default storage policy", and the Description's Fix paragraph now states that the four CREATE TABLEs are pinned to SETTINGS storage_policy = 'default' so the seeding part stays on the built-in local default disk and the PartLoadingTree::add coverage keeps running under stress (not skipped), citing the 04063_drop_detached_part_with_try_n_suffix.sh precedent. The superseded "skip on non-local disks" wording is gone.
CI finish ledger — 8581ba3Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens.
This PR is test-only (pins 4 part_loading_tree_rollback tests to storage_policy='default'); it touches no server source and cannot cause a server death in an unrelated minmax-index test. Not PR-caused. Session id: cron:our-pr-ci-monitor:20260719-230000 |
|
@groeneai Check the CI failure. |
|
@tuanpach Checked it. The only red job is a server death on It is not caused by this PR. The change is test-only (it pins 4 No fixing PR exists yet. I have a task investigating the crash stack from the job's |
|
#111055 supersedes this PR |
|
Closing out the finish-ledger line I left open here on 2026-07-19 for I read the coverage job's The handled exceptions right after it carry the owning test's comment tag, Owner of that signature: issue #110133, fixed by #110048 (merged 2026-07-26), with #109747 open as the hardening half that stops the type mismatch from aborting during partial result evaluation. The test's two other CI hits are unrelated to both this PR and to minmax indices: two So there is no fix to write for |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Fixes stress-test
Cannot start clickhouse-serverboot failures withCode: 246 CORRUPTED_DATA: Part all_5_6_1_0 intersects previous part all_1_5_4_1 and the transaction metadata of at least one of them could not be readfor tablest_plt_reparent/t_plt_evict_reinsert.Cause. The four
part_loading_tree_rollbacktests (04063,04241,04417,04500, added in #100992) fabricate a rolled-back part by writing a rawtxn_version.txtstraight into the part directory withcp+printf. That is only valid on a local disk. On an object-storage /local_blob_storagedisk a part-dir file must beDiskObjectStorageMetadataformat, so the raw file fails to parse (CANNOT_PARSE_INPUT_ASSERTION_FAILEDinDiskObjectStorageMetadata::deserialize), which #100992's newPartLoadingTree::addtxn-metadata read classifies asUnreadableand turns into a fatalCode 246at part load. The failedATTACHleaves a detached, poisoned table whose.sqlsurvives to the stress restart, so the next boot aborts.The tests carry
no-object-storage, but that tag only skips the object-storage runner modes (--s3-storage/--azure-blob-storage); it does not fire when the server's default disk is object-storage (as under stress), so the tests run there anyway.Fix. Pin the four
CREATE TABLEs toSETTINGS storage_policy = 'default', so the seeding part always lands on the built-in localdefaultdisk even when the MergeTree default policy is object-storage under stress. The rawtxn_version.txtfabrication then parses and thePartLoadingTree::addregression keeps running (it is not turned into a skipped no-op). The stress config override (config.d/s3_storage_policy_for_merge_tree_by_default.xml) only sets<merge_tree><storage_policy>, so the built-indefaultpolicy is never remapped and the pin is reliable. Same pattern as the already-merged raw-filesystem test04063_drop_detached_part_with_try_n_suffix.sh.Deterministic; reproduced both directions locally (object-storage default disk: without the pin
Code 246, with the pin the ATTACH succeeds and the assertions run; local disk unchanged).Follow-ups for the author (@ tuanpach), not addressed here:
no-object-storagealso skip when the server default disk is object-storage? The runner-flag-only gate misses this whole class of raw part-fabrication tests.Unreadabletxn-metadata case abort the entire server boot, or skip/quarantine the single affected part/table? A single unparseabletxn_version.txtcurrently prevents startup.