Repository navigation
Pin test 04630 to the local disk: it corrupts shared S3 keys in stress runs - #113978
Conversation
…s runs The test copies a packed part directory with plain cp to simulate a stale tmp_merge directory. Stress jobs flip the default MergeTree storage_policy to (cached) S3 or Azure in the server config without passing the corresponding flag to clickhouse-test, so the no-object-storage tag does not protect them. On a remote disk, cp duplicates the metadata files without incrementing the blob reference counts, and reclaiming the stale directory deletes blobs still referenced by the live part - every later read of it fails with 'The specified key does not exist', tripping the stress check's no-such-key detector. Pin storage_policy = 'default' so the part directory is always a genuine local copy. Seen on every stress run since the test merged, e.g. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=111990&sha=279101c71314bcf8e46a083cbf950ecb2143aa44&name_0=PR&name_1=Stress%20test%20%28arm_tsan%29 (PR: #111990) Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [2d0a98f] Summary: ✅ AI ReviewSummaryThis PR hard-pins Missing context / blind spots
Final Verdict✅ No review findings. |
Build profile diff (arm_release)Comparing Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units
|
…ked-pin-local-disk
|
🕵 The only red on |
alexey-milovidov
left a comment
There was a problem hiding this comment.
I'll merge it, but we don't allow modifying table data in stateless tests at all.
It should be an integration test.
…tegration Conflict: master pinned `storage_policy` to `default` in `04630_merge_over_stale_packed_tmp_dir.sh` (the local-disk workaround from #113978), while this branch removes the stateless test entirely. Resolved by keeping the deletion — the scenario now lives in the integration test `test_packed_io::test_merge_over_stale_packed_tmp_dir`, which controls the disk configuration directly, so the pin is no longer needed.
Four of the five red checks on the previous head are resolved by fixes that landed on master after this branch last moved: - Stress test (amd_tsan), Bad cast from ColumnString to ColumnNullable: fixed by ClickHouse#113925. - Stress test (arm_asan_ubsan), S3_ERROR No such key in 04630_merge_over_stale_packed_tmp_dir: fixed by ClickHouse#113978, which pins that test to the local disk. - Stateless tests (amd_tsan, parallel), 04722_count_substrings_cancellation: the test was removed from master in d5bc955. - Bugfix validation (unit tests), inconclusive on submodule drift between the merge-base and the checkout: the merge takes master's submodule pins, so the two trees agree again.
…test Stateless tests must not modify table data on disk: the suite runs against arbitrary server configurations (object storage, shared merge tree, encrypted disks), where direct manipulation of part directories is either impossible or corrupts shared state. The scenario moves to `test_packed_io::test_merge_over_stale_packed_tmp_dir` unchanged: a merge must reclaim a stale `tmp_merge_` directory left by an interrupted attempt and must not seed any data from it. See ClickHouse#113978 (review) Related: ClickHouse#113978 Related: ClickHouse#111652 Co-Authored-By: Claude Fable 5 <[email protected]>
…gration tests Stateless tests must not modify the server's data on disk: the suite runs against arbitrary server configurations (object storage, shared merge tree, encrypted disks), where the local part layout either does not exist or does not mean what the test assumes, and modifying it corrupts shared state. 37 stateless tests move to integration tests, grouped by scenario: - test_broken_projections (extended): 02254, 04511 - test_broken_tmp_txn_version_startup (extended): 04104, 04492, 04493, 04507 - test_lost_part (extended): 02369, 02370, 04215 - test_corrupted_part_files (new): 02253, 02255, 02444, 04151, 04235, 04323, 04506 - test_mutations_with_tampered_parts (new): 04401, 04412, 04426, 04427, 04428, 04431 - test_attach_tampered_detached_parts (new): 04063, 04246, 04402, 04403, 04404, 04425 - test_backups_from_disk (new): 04054, 04495, 02864, 03001_restore..., 03214, 03231, replacing helpers/install_predefined_backup.sh; the canned backups move along - test_server_metadata_files (new): 03001_matview..., 04329, 04545 The conversions are faithful: every .reference output became an exact assertion, the explanatory comments are preserved, and DETACH/ATTACH stayed DETACH/ATTACH except where the original explicitly emulated a server restart (02255, 04215). Notable: 02444's `rm -f "$path/*.bin"` never expanded the glob (quoting bug), so its corruption was an accidental no-op; the converted test applies it for real and the assertions still hold. See ClickHouse#113978 (review) Related: ClickHouse#114056 Related: ClickHouse#114057 Co-Authored-By: Claude Fable 5 <[email protected]>
Test
04630_merge_over_stale_packed_tmp_dir(added in #111652) copies a packed part directory with plaincpto simulate a staletmp_merge_directory left by an interrupted merge. Stress jobs flip the defaultMergeTreestorage_policyto (cached) S3 or Azure in the server config (tests/docker_scripts/stress_runner.sh) without passing the corresponding flag toclickhouse-test, so theno-object-storagetag does not protect them and the test runs with the table on a remote disk.On a remote disk,
cpduplicates the metadata files without incrementing the blob reference counts. When the merge reclaims the stale directory, it deletes blobs still referenced by the live part, and every later read of that part fails withThe specified key does not exist, tripping the stress check's global no-such-key detector. This has failed the stress checks on every run since the test merged (2026-08-07): 15+ unrelated PRs plus master, all witht_merge_over_stale_packedin the failure context.The fix pins
storage_policy = 'default'atCREATE TABLE, which overrides the config-level<merge_tree>default, so the part directory is always a genuine local copy and the reclaim removes only local files. The test's purpose — merge reclaiming a stale packedtmp_merge_directory on the local filesystem — is unchanged. Verified locally: the test passes.Example failure on an unrelated PR (#111990): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=111990&sha=279101c71314bcf8e46a083cbf950ecb2143aa44&name_0=PR&name_1=Stress%20test%20%28arm_tsan%29
Related: #111652
Changelog category (leave one):