Skip to content

Keep DDL out of the AST fuzzer in 04908_constraint_subquery_loading_dependency - #124408

Merged
PedroTadim merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/04908-no-ddl-fuzzing
Oct 8, 2026
Merged

PedroTadim merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/04908-no-ddl-fuzzing

Conversation

@groeneai

@groeneai groeneai commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #116222

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Test-only change, no changelog entry required.

Description

Stress test (arm_release) on #116222 failed with Cannot start clickhouse-server:

Load job 'load table test_7.t_constraint_dep_user__fuzz_3' failed: Code: 393. There is no query or query
context has expired: While processing (SELECT DISTINCT max(id) + 1000 FROM remote('127.0.0.1', 'test_7',
't_constraint_dep_source')) ...

Failing job: https://github.com/ClickHouse/ClickHouse/actions/runs/37537578074/job/112627772704
(report)

The table is a fuzzer clone of t_constraint_dep_user from this test. The stress profile sets
ast_fuzzer_any_query (tests/docker_scripts/stress_tests.lib:211), so the server-side AST fuzzer replays
this file's DDL too, and a replayed CREATE can read the CHECK source through remote(). CREATE accepts
it, but the subquery cannot be analysed while the table is loaded at startup. Stress runs this test in the
shared database test_7, which is never dropped, so the restart loads the clone and fails.

This pins ast_fuzzer_any_query = 0 for every client call of the file, the remedy of #121952 and #123423
for 05234 and 05292. Its SELECTs are still fuzzed.

Validation on a master debug build with the stress fuzzer profile: 50 runs before the change replayed 4955
DDL statements on the test's objects, 51 of them a CREATE with a table function in the CHECK. 50 runs
after it replayed 0 DDL and 1237 SELECTs, all OK. Creating the clone from the CI log and restarting with
async_load_databases = false fails with the same error. 50/50 randomized runs pass.

The CREATE/load asymmetry itself belongs to #96886.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/124408]

Version info

  • Merged into: 26.10.1.1835-master (included in 26.10 and later)

…ependency

The stress profile replays this file's DDL through the server-side AST fuzzer. A replayed
`CREATE` can read the `CHECK` source through `remote`; `CREATE` accepts it, but the database
loader cannot analyse it, so the leftover clone stops the server restart. Pin
`ast_fuzzer_any_query = 0` on every client call of the file so only SELECTs are fuzzed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-request PR origin: a maintainer pinged or directed groeneai labels Oct 7, 2026
@groeneai

groeneai commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author
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 (0 findings). Nothing to adjudicate.

Session id: cron:clickhouse-review-slot-8:20261007-105700

@clickhouse-gh

clickhouse-gh Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5791a70]

Summary: ✅


AI Review

Summary

This PR hardens tests/queries/0_stateless/04908_constraint_subquery_loading_dependency.sh against the stress profile's server-side AST fuzzer by pinning ast_fuzzer_any_query = 0 on every client invocation in the file, so its DDL is no longer replayed while the read-only SELECT checks remain fuzzable. That matches the setting's execution-time semantics and the existing pattern used in nearby stateless tests that protect DDL with external dependencies or startup-sensitive metadata, and I do not see a correctness or coverage regression in the current diff.

Missing context / blind spots
  • ⚠️ I reviewed the diff, surrounding test context, and prior PR discussion, but I did not rerun the randomized stress profile or the linked CI reproducer locally.
Final Verdict

✅ No new inline findings.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Oct 7, 2026
@groeneai
groeneai requested a review from PedroTadim October 7, 2026 11:17
@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Oct 7, 2026
@PedroTadim PedroTadim self-assigned this Oct 8, 2026
@PedroTadim
PedroTadim enabled auto-merge October 8, 2026 07:48
@PedroTadim
PedroTadim added this pull request to the merge queue Oct 8, 2026
Merged via the queue into ClickHouse:master with commit c23efd8 Oct 8, 2026
152 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 8, 2026
valerypetrov pushed a commit to valerypetrov/ClickHouse that referenced this pull request Nov 13, 2026
…nt-subquery-loading-dependency"

This reverts commit 659cc1c, reversing
changes made to f75df10.

Conflicts resolved by removing only what ClickHouse#114923 added: the narrow
qualification pass in AddDefaultDatabaseVisitor.h is removed together with
the parts ClickHouse#114908 later added inside it; InterpreterCreateQuery.cpp keeps
the expansion bound of ClickHouse#122362 on the neighbouring call; the string overload
of qualifyDictionaryNameWithDatabase in ExternalDictionariesLoader is kept,
because the dictionary usage record of ClickHouse#121567 is built on it.
04908_constraint_subquery_loading_dependency.sh (edited by ClickHouse#124408) is
deleted with the rest of the test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added comp-database-engines Database engine implementations (e.g., Atomic/Replicated) and database-level behavior. and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-database-engines Database engine implementations (e.g., Atomic/Replicated) and database-level behavior. groeneai-origin-request PR origin: a maintainer pinged or directed groeneai pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants