Repository navigation
Keep the stress AST fuzzer and ignored DROPs out of 05496_dynamic_disk_wrapper_of_server_credentials_disk - #130670
Conversation
The stress `default` profile sets `ast_fuzzer_runs = 5` and `ast_fuzzer_any_query = true`, so every successful CREATE of 05496_dynamic_disk_wrapper_of_server_credentials_disk is replayed as `created__fuzz_N` / `t_policy__fuzz_N`. The test drops only `created` and `t_policy`, and the copies name by reference the disks and storage policies (`plain_<db>`, `server_<db>`, `__plain_<db>`, `__server_<db>`) that only the dropped tables defined, or resolve them through Keeper nodes the test removes at the end. After the post-stress restart nothing defines those names, the copy's metadata cannot be parsed and the server does not start (`Cannot start clickhouse-server`, 11 Stress rows since ClickHouse#129044 merged, including master and the 26.10 backport branch). Stress also passes `ignore_drop_queries_probability=0.2` to every client, and an ignored DROP of `created` or `t_policy` leaves a table that cannot be loaded after the restart either. Pin `--ast_fuzzer_any_query=0 --ignore_drop_queries_probability=0` on the test's client (the same pair as 05321). With `ast_fuzzer_any_query = 0` `executeASTFuzzerQueries` returns early for every non-read-only seed, and the test issues only DDL. The appended values win over the stress client options because clickhouse-test passes `--allow_repeated_settings` and the client keeps the last occurrence. Local reproduction with the stress fuzzer profile (debug build, CI config): unpatched, 3 runs in a fixed database left 8 copies and the restart with `async_load_databases = false` failed with `Code: 478 Unknown storage policy __plain_test_1 ... created__fuzz_84.sql`; with every DROP ignored it failed with `Code: 478 ... __server_test_1 ... t_policy.sql`. Patched: 0 copies, 0 ignored DROPs of the test's tables, the restart succeeds; 50/50 randomized runs pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings; 1 full pass) and my own cold review (0 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261111-014000 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261111-010900 |
|
Workflow [PR], commit [dcd4723] Summary: ✅ AI ReviewSummaryThe test disables DDL fuzzing and ignored Final VerdictStatus: ✅ Approve |
0723951
|
This fix is also needed on 26.8, 26.9 and 26.10. The backports of #129044 (#130471, #130472, #130473) added
The cherry-pick should apply cleanly, because the file is identical on all three branches and on this PR's base (blob |
Backport #130670 to 26.9: Keep the stress AST fuzzer and ignored DROPs out of 05496_dynamic_disk_wrapper_of_server_credentials_disk
Backport #130670 to 26.10: Keep the stress AST fuzzer and ignored DROPs out of 05496_dynamic_disk_wrapper_of_server_credentials_disk
Backport #130670 to 26.8: Keep the stress AST fuzzer and ignored DROPs out of 05496_dynamic_disk_wrapper_of_server_credentials_disk
…isk in a Memory database The stress test stops every worker at its global time limit. Worker 0 runs the tests in the runner's default descending order, so the limit lands in the same band of newest tests on every run; on 26.8 that band includes 05496 (4 `Stress test` jobs in 4 days, with ClickHouse#130670 present). The test can then stop between a `CREATE TABLE` that names a disk of an already dropped table (`disk = '<name>'`, `storage_policy = '__<name>'`, a wrapper of `server_<db>`) and its `DROP`. `prepare_for_hung_check` detaches, not drops, the databases, the restart attaches them again, the table cannot be loaded (`Unknown storage policy __server_<db>`, `Unknown disk plain_<db>`, `The wrapped disk must have been announced earlier`) and the server does not start. An interruption cannot be pinned by a setting, so every table of the test now lives in a Memory database, which keeps no table metadata on disk: after the restart it is empty, wherever the test was stopped. That also covers a `DROP` lost to an injected memory fault, so the `memory_tracker_fault_probability=0` pin of the previous commit is removed again. Same shape as ClickHouse#122101 (05234) and ClickHouse#131581 (05620). `CREATE DATABASE ... ENGINE = Memory` stays on one line: the runner's `--replace-log-memory-with-mergetree` (stress worker 0) rewrites `ENGINE = Memory` to MergeTree except on a line with `CREATE DATABASE`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nored DROPs out of 05496_dynamic_disk_wrapper_of_server_credentials_disk
…er_credentials_disk Stress workers with `i % 5 == 1` run every test with `memory_tracker_fault_probability=0.05`. The setting also applies to the client's own query memory tracker, so a `clickhouse client` call can fail with `Code: 241 ... fault injected` before it sends its query. When that call is the cleanup `DROP` of the last `run()` or of `t_policy`, a table that names the dynamic disk `plain_<db>` (or the policy `__server_<db>`) survives the test. Nothing defines that disk after a restart, so the server cannot load the table and does not start (`Code: 479 Unknown disk plain_test_1`, seen on ClickHouse#124804 with ClickHouse#130670 already in the build). Pin the probability to 0 for this test, next to the fuzzer and ignored DROP pins added by ClickHouse#130670. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #129044
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
Since #129044 merged,
Stress test (*)often cannot restart the server (Cannot start clickhouse-server): 11 runs on 6 flavours, including master and 26.10. Every one fails to load a table of 05496, e.g.:The stress profile sets
ast_fuzzer_any_query(tests/docker_scripts/stress_tests.lib), so the server replays the test'sCREATEs ascreated__fuzz_N/t_policy__fuzz_N. The test drops onlycreatedandt_policy. The copies name, by reference, disks and storage policies that only the dropped tables defined, or resolve them through Keeper nodes the test removes at the end. After the restart nothing defines those names. Stress also passesignore_drop_queries_probability=0.2(ci/jobs/scripts/stress/stress.py), and an ignored DROP ofcreatedort_policyleaves a table that cannot be loaded either.The test's client now pins
--ast_fuzzer_any_query=0 --ignore_drop_queries_probability=0(the same pair as05321_sqlite_pushdown_enum_constant). No query or.referencechanges.Validated on a local debug server with the CI config and the stress fuzzer profile, restarting with
async_load_databases = false. Unpatched: 8 copies left and the restart fails with the error above; with every DROP ignored it fails ont_policy.sql. Patched: no copies, no ignored DROPs, the restart succeeds, while the unpatched file on the same server still leaves 14 copies. 50/50 randomized runs pass.#129044 is also on 26.8, 26.9 and 26.10 (#130471, #130472, #130473), so this needs the same backports. Reverting #129044 and those backports would also stop the failures; I did not choose that because the defect is only in the test.
Workflow [PR]
Sync PR [sync-upstream/pr/130670]
Version info
26.11.1.1989-master(included in26.11and later)26.10.5.46,26.9.31.11,26.8.39.10