Repository navigation
Keep DDL out of the AST fuzzer in 05234_read_only_disk_hard_links_capability - #125307
Conversation
…ability Stress test (amd_debug) on ClickHouse#124763 could not restart the server: the load of `test_7.reader_hard_links__fuzz_4` failed with `Code: 4 ... primary.cidx is unexpectedly long`. That table is a clone of the test's read-only reader made by the server-side AST fuzzer (`ast_fuzzer_any_query = true` in Stress) with `key Array(Int32)` over the writer's `Int32` part. The clone's CREATE passed only because its primary index prewarm hit the original reader's cache entry, which is keyed by disk name and part path; after the restart the cache is empty and the clone's own index load fails. Such a misdeclared `table_disk` reader is documented as unsupported. The part survived because the cleanup aborted at its first statement: the fault-injected `ignore_drop_queries_probability = 0.2` turns `DROP TABLE reader SYNC` on a read-only table into a TRUNCATE, which fails with `Code: 774`, so the writers were never dropped. Set `ast_fuzzer_any_query = 0, ignore_drop_queries_probability = 0` in the two sessions that create the tables and `ignore_drop_queries_probability = 0` in the cleanup session, as for 05104, 05227 and 05228. SELECTs, hypothetical indexes and the cleanup DROPs stay fuzzed. 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) plus my own cold review (3 nits, none blocking).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261012-031700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261012-024100 |
|
Workflow [PR], commit [23135ad] Summary: ✅ AI ReviewSummaryThis PR pins Final VerdictStatus: ✅ Approve |
Related: #124342
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
Stress test (amd_debug) on #124763 could not restart the server:
Load job 'load table test_7.reader_hard_links__fuzz_4' failed: Code: 4 ... Index file all_1_1_0/primary.cidx is unexpectedly long.That table is a clone of the test's read-only
reader_hard_links, made by the server-side AST fuzzer (ast_fuzzer_any_query = truein Stress) withkey Array(Int32)over the writer'sInt32part. ItsCREATEpassed only because the primary index prewarm hit the original reader's cache entry, which is keyed by disk name and part path; after the restart the cache is empty and the clone's own index load fails. Atable_diskreader that declares other columns over the same parts is documented as unsupported (#119295). The cleanup did not remove the part either:ignore_drop_queries_probability = 0.2turnedDROP TABLE reader SYNCinto aTRUNCATE, which a read-only table rejects withCode: 774, so the rest of that block never ran.The change is test-only, the same shape as #124342: the two sessions that create the tables set
ast_fuzzer_any_query = 0, ignore_drop_queries_probability = 0, and the cleanup session setsignore_drop_queries_probability = 0. TheSELECT,CREATE HYPOTHETICAL INDEXand cleanupDROPqueries stay fuzzed. The other tests with a read-onlytable_diskreader have shown no such failure in 90 days, so they are unchanged. Alternatively, the primary index cache key could include the table, which makes such a clone fail atCREATE.Validation
Local server with the Stress fuzzer settings,
use_primary_key_cache = prewarm_primary_key_cache = 1,--client-option ignore_drop_queries_probability=0.2, one kept database as in Stress, then a restart withasync_load_databases = false:CREATEs, 10 and 11 clones left, and 3 of 3 restarts failed, 2 of them with the CI error.CREATEs, no table left, 5 of 5 restarts start.SETof the second block brings back 354 cloneCREATEs and 20 leftover clones;ignore_drop_queries_probability = 1in the cleanup brings backCode: 774and leaves all four tables.50 randomized runs pass on a regular server and 20 on the fuzzer profile; the reference is unchanged.
Workflow [PR]
Sync PR [sync-upstream/pr/125307]
Version info
26.10.1.2226-master(included in26.10and later)