Skip to content

Do not abort server when loading a view without columns in metadata - #110906

Open
groeneai wants to merge 8 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-columnless-view-metadata-server-abort
Open

groeneai wants to merge 8 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-columnless-view-metadata-server-abort

Conversation

@groeneai

@groeneai groeneai commented Jul 17, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Loading a VIEW whose stored metadata has no column list no longer raises LOGICAL_ERROR: Invalid storage definition in metadata file, which aborts the process on a server where a logical error is fatal (debug and sanitizer builds, or abort_on_logical_error = 1). Such metadata now fails to load with a catchable EMPTY_LIST_OF_COLUMNS_PASSED exception.

Description

Related: #60708

createTableFromAST (src/Databases/DatabaseOnDisk.cpp) raised LOGICAL_ERROR whenever a table had no column list and no storage engine. An ordinary view never has a storage engine (StorageFactory forbids one), so for views that guard reduces to "no column list implies LOGICAL_ERROR", while every other columnless case takes the ordinary EMPTY_LIST_OF_COLUMNS_PASSED branch beside it. Only parameterized views were exempted (#60708); those are stored without a column list by design. Corrupted or externally modified view metadata that is no longer recognized as parameterized hit the throw during async table loading.

The fix skips the throw for all views, so such metadata fails to load with a catchable exception.

Measured on a real server: columnless view metadata, plus a normal table, plus a restart.

  • Debug or sanitizer build, and release with abort_on_logical_error = 1 (what tests/config/install.sh installs for every functional and stress server except Fast test): before, Received signal 6 inside the async loader and the server never accepts a connection, so no table is reachable. After, the server starts, serves every other table, and reading the view returns EMPTY_LIST_OF_COLUMNS_PASSED.
  • Default release build: the server survives either way; only the error class changes.
  • async_load_databases = 0: startup fails either way.

Found by Stress test (amd_asan_ubsan), which aborted on every restart while loading the fuzzer-created parameterized view test_5.prewhere_bug_view__fuzz_4 (from 04227_prewhere_parameterized_view_join_102074.sql). The same signature reached the 26.7 release branch on 2026-08-29 with test_3.date32_pv__fuzz_4.
Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=107091&sha=5e31ccb31390e87186ca0a7a5a047aec6968c392&name_0=PR&name_1=Stress%20test%20%28amd_asan_ubsan%29

Stack from that report:

DB::createTableFromAST (src/Databases/DatabaseOnDisk.cpp:127)
DB::DatabaseOrdinary::loadTableFromMetadata (src/Databases/DatabaseOrdinary.cpp:386)
DB::AsyncLoader::worker
-> <Fatal> Received signal 6 (Aborted)

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

createTableFromAST threw a LOGICAL_ERROR (Invalid storage definition in
metadata file) when a table had no column list and no storage engine.
That premise is false for views: an ordinary view has no engine by design
and its column list may legitimately be absent (StorageFactory forbids an
engine on views and StorageView handles empty columns). Previously only
parameterized views were exempt (see ClickHouse#60708), so any other columnless view
in on-disk metadata (as produced by the AST fuzzer or manual intervention)
aborted the whole server on startup during async table loading.

Exempt all views from the throw. A columnless view now fails to load with a
normal catchable EMPTY_LIST_OF_COLUMNS_PASSED exception instead of killing
the server.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Check Result
a Deterministic repro? Yes. Create an Atomic DB + CREATE VIEW v (x UInt8) AS SELECT 1, DETACH DATABASE, strip the column list from the on-disk .sql metadata, ATTACH DATABASE. On master the server aborts (signal 6, Invalid storage definition in metadata file, exit 134).
b Root cause explained? createTableFromAST throws LOGICAL_ERROR when a table has no column list AND no storage engine. That premise is false for views: an ordinary view has no engine by design (StorageFactory forbids one) and its column list may legitimately be absent. Only parameterized views were exempted (#60708), so any other columnless view in metadata aborts the whole server during async startup loading.
c Fix matches root cause? Yes. The throw is skipped for all views (isView()), mirroring how StorageFactory/StorageView already handle engineless, columnless views.
d Test intent preserved / new test added? New test 04603_columnless_view_metadata_no_server_abort.sh: loads a columnless view from metadata and asserts the server survives with a catchable EMPTY_LIST_OF_COLUMNS_PASSED instead of aborting. The throw is still active for genuine non-view tables.
e Demonstrated both directions? Yes. Pre-fix binary: server aborts (signal 6). Fixed binary: EMPTY_LIST_OF_COLUMNS_PASSED returned, server stays alive. Verified locally on amd_debug.
f General, not a narrow patch? The exemption covers all view kinds (ordinary/materialized/window via isView()), not just the one fuzzer variant. The sibling check in DatabasesCommon.cpp::applyMetadataChangesToCreateQuery runs only in query context (ALTER), so it does not abort the server; left unchanged.
g Generalizes across inputs? The condition is view-kind based, independent of the view's SELECT shape, parameters, or column types.
h Backward compatible? Yes. No format/setting change. A columnless view that previously crashed the server now fails to load with a normal exception; well-formed views are unaffected.
i Invariants preserved? Yes. Non-view tables still require columns or an engine (throw retained). Views proceed to StorageFactory::get, which already rejects an engine on views and constructs StorageView with the (possibly empty) columns, matching the parameterized-view path.

Session id: cron:clickhouse-worker-slot-5:20260717-173001

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @tavplubix @KochetovNicolai — could you review this? It stops the server aborting on startup (LOGICAL_ERROR: Invalid storage definition in metadata file) when a VIEW is stored without a column list in its metadata. A view has no storage engine by design, so createTableFromAST should not treat a missing column list as a fatal inconsistency; only parameterized views were exempted before (#60708). Found by the Stress test (amd_asan_ubsan) restart phase loading a fuzzer-created parameterized view.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jul 17, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [258d7fb]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6) FAIL
test_hedged_requests/test.py::test_receive_timeout1 FAIL cidb

AI Review

Summary

This PR fixes the real product bug in createTableFromAST: a columnless view metadata file no longer throws a fatal LOGICAL_ERROR, so the load path degrades to an ordinary exception instead of hitting the debug/ASan abort path. I do not think the accompanying test is merge-ready, though, because it bypasses the new stateless-test guard by whitelisting a repro that still rewrites live server metadata on the shared functional-test server.

Findings

⚠️ Majors

  • [ci/jobs/check_style.py:357] SERVER_DATA_MANIPULATION_EXCLUSIONS is only meant for false positives that touch the test's own scratch files, but 04603_columnless_view_metadata_no_server_abort.sh still reads system.tables.metadata_path / system.server_settings.path, rewrites live database metadata, flushes the server-wide disk metadata cache, and relies on no-parallel to avoid interference. That weakens the server_data_manipulation_in_stateless_tests contract instead of satisfying it, and a failing run can still poison shared server state for later stateless tests. Suggested fix: reproduce the load failure under clickhouse-local --path in a scratch directory like 04651_parameterized_view_union_child_metadata.sh, or move the server-liveness variant to an integration test instead of exempting it here.
Final Verdict

Changes requested. The product-side fix looks correct, but the test needs to be isolated rather than carving out a new exception to the shared-server metadata-mutation guard.

LLVM Coverage Report

Measured on commit 258d7fb.

Metric Baseline Current Δ
Lines 88.60% 88.60% +0.00%
Functions 92.10% 92.10% +0.00%
Branches 80.90% 80.90% +0.00%

Changed lines: Changed C/C++ lines covered: 2/6 (33.33%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jul 17, 2026
Under the CI "db disk" config (--remote-database-disk) the database
metadata lives on a remote object-storage disk, so the test's local
filesystem perl edit of v.sql could not find the file: it emitted stderr
and skipped the column strip, so EMPTY_LIST_OF_COLUMNS_PASSED was never
produced and the test failed. Make the metadata edit disk-agnostic like
03001_matview_columns_after_modify_query: edit locally when the file is on
the local FS, otherwise read/transform/write via clickhouse-disks against a
bundled disk config and drop the plain_rewritable metadata cache.

The source fix is unchanged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
grep -o | head -n1 always exits 0 (head is the terminal command), so the
assertion could pass even if the marker never appeared. Make grep the
terminal command with -m1; stdout is byte-identical, exit code now reflects
whether EMPTY_LIST_OF_COLUMNS_PASSED was actually produced.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Applied in 4b7e189: made grep the terminal command (grep -o -m1 "EMPTY_LIST_OF_COLUMNS_PASSED", dropped the trailing head), so its exit code is no longer masked. stdout is byte-identical to the old grep | head -n1 for this test (single match on the first matching line), so the .reference gate is unchanged; the exit code now reflects whether the marker was actually produced. Verified: 50/50 passes with randomization; and with the marker absent the line exits non-zero (vs the old form which returned 0).

After the expected ATTACH DATABASE failure (EMPTY_LIST_OF_COLUMNS_PASSED),
the database is detached but its on-disk metadata file is not dropped, so a
plain DROP DATABASE IF EXISTS is a no-op and leaves the metadata behind. A
rerun on the same server would then fail at CREATE DATABASE with
ATOMIC_RENAME_FAIL because the metadata file already exists. Restore the
original valid metadata, re-attach, and DROP DATABASE ... SYNC so cleanup is
unconditional and idempotent. Keep the original metadata in a variable rather
than a sidecar file (an extra file in the store dir makes ATTACH fail with
INCORRECT_FILE_NAME).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Confirmed and fixed in 0603b03.

Reproduced the mechanism locally: after the expected ATTACH DATABASE failure the database is detached but its metadata file stays on disk, so DROP DATABASE IF EXISTS is a no-op and a rerun on the same server fails at CREATE DATABASE with Code 521 ATOMIC_RENAME_FAIL: ... the second path already exists.

Fix: keep the original valid metadata in a variable, restore it, ATTACH DATABASE, then DROP DATABASE ... SYNC so cleanup is unconditional in both the local-fs and db disk (clickhouse-disks) branches. A sidecar backup file is not used because any extra file in the store dir makes ATTACH fail with INCORRECT_FILE_NAME.

Verified: running the test twice on one server with a fixed db name fails at run 2 on the old version and passes on the new one; stdout is unchanged; 50/50 with randomization pass.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 0603b03

Check / test Reason Owner / fixing PR
Integration tests (amd_tsan, 3/6) / test_replicated_database::test_replicated_table_structure_alter flaky (91 master hits + 20+ unrelated PRs, 30d) #110030 (ours, open)
CH Inc sync private sync not actionable by us

Our regression test 04603_columnless_view_metadata_no_server_abort passes on this head across every sanitizer build and all 4 flaky-check jobs. The top-level PR status is the rollup of the flaky integration sub-job (Mergeable Check = SUCCESS). Every failure has an owner; none is PR-caused.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 0603b03

CI fully finished on this head (Finish Workflow / Config Workflow / Mergeable Check all green). Every failure below has an owner.

Check / test Reason Owner / fixing PR
Integration tests (amd_tsan, 3/6) / test_replicated_database::test_replicated_table_structure_alter flaky - master-wide regression since 2026-07-10 (issue #110036): 91 master hits in 30d, ~30 unrelated PRs; this PR only touches columnless-view metadata loading, unrelated to Replicated-DB structure convergence #110030 (ours, open) - Closes #110036
CH Inc sync - CH Inc sync (private, not actionable by us)

The earlier PR-caused failure (04603_columnless_view_metadata_no_server_abort on the db disk config) is resolved on this head.

Session id: cron:our-pr-ci-monitor:20260718-143000

@clickhouse-gh

clickhouse-gh Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.30% 86.30% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.50% 78.50% +0.00%

Changed lines: Changed C/C++ lines covered: 2/6 (33.33%) · Uncovered code

Full report · Diff report

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - d9223e8

CI is fully finished on this head with no failing checks, so there is nothing to
disposition. Recording the ledger for completeness.

Session id: cron:our-pr-ci-monitor:20260729-083000

alexey-milovidov and others added 2 commits August 29, 2026 21:21
…ation check

Public master gained `server_data_manipulation_in_stateless_tests` after this
branch was cut, and it flags this test: it reads `metadata_path` from
`system.tables` and then writes that file. The heuristic is right about the shape
but wrong about the risk here - the test edits only the metadata of the view it
created itself. A view has no data parts, so none of the part-directory or blob
reference-counting hazards the check guards against apply. On a remote database
disk the edit goes through `clickhouse-disks` rather than a raw copy, the metadata
cache is dropped so the edit is visible, the original definition is restored at the
end, and the test is already tagged `no-replicated-database` and
`no-shared-catalog`.

Without this the check fails both here and in the private sync once master is
merged, which is what surfaced it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Aug 29, 2026
Comment thread ci/jobs/check_style.py
# apply. On a remote database disk it goes through `clickhouse-disks` rather than a raw copy,
# drops the metadata cache afterwards, restores the original definition, and the test is tagged
# no-replicated-database / no-shared-catalog.
"04603_columnless_view_metadata_no_server_abort.sh",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a false positive under the new server_data_manipulation_in_stateless_tests contract: the new regression test reads system.tables.metadata_path / the server root, rewrites live database metadata (including via clickhouse-disks write), and then relies on no-parallel because it is mutating shared server state. Exempting it here weakens the guard instead of fixing the portability problem.

We already cover the same metadata-reload family safely with clickhouse-local --path scratch directories in 04651_parameterized_view_union_child_metadata.sh. Please use the same pattern here, or move this scenario to an integration test, so a failing run cannot leave corrupted metadata behind on the shared server.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with the commit message that the heuristic is right about the shape: the test does read metadata_path from system.tables and then rewrite that file.

What I can add is a measurement. The scenario does not need the shared server at all. A clickhouse-local --path scratch directory reaches the same load path:

  • Unfixed master binary, column list stripped from the view metadata inside the test's own temp dir: Logical error: 'Invalid storage definition in metadata file', signal 6, at DatabaseOnDisk.cpp:145 in createTableFromAST, called from loadTableFromMetadata and loadTableFromMetadataAsync. Same frames as the stress-test abort this PR fixes.
  • Same steps on this branch: no abort, Code: 90 ... (EMPTY_LIST_OF_COLUMNS_PASSED).
  • Control with the metadata left alone: loads and queries normally.

One thing that form gives up: clickhouse-local waits on every load job, so any query after the bad load returns ASYNC_LOAD_WAIT_FAILED wrapping the same exception. So it proves the abort becomes a catchable exception, but not "the server stays up and keeps serving other tables", which is what the current ATTACH DATABASE shape asserts. Keeping that assertion needs a real server, so an integration test.

The --path form also drops the exclusion entry, the clickhouse-disks branch, 04603_columnless_view_metadata_no_server_abort.xml, the metadata cache drop, the restore-and-reattach cleanup, and all four tags. I have it written and green in both directions locally.

I have not pushed anything, since the head is yours. I can send it if you want it.

@clickhouse-gh

clickhouse-gh Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 258d7fb74 with master bb113c384 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of d469feea5; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

7 translation units recompiled, 10 s compile time in total, 7 of them have a recent master baseline.

Job report

@clickhouse-gh

clickhouse-gh Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 40 queries analysed

no significant changes detected. K_source=6 K_base=30 flagged=0/65

clickbench

🟢 No significant changes

tpch_adapted_1_official

🟢 No significant changes

Debug info
  • StressHouse run: de7348ee-9a70-4bb1-9bdd-c1d21625ddba
  • MIRAI run: 22ca9934-ff03-494c-ad36-cd2c468e4546
  • PR check IDs:
    • clickbench_557527_1788150759
    • clickbench_557533_1788150759
    • clickbench_557539_1788150759
    • tpch_adapted_1_official_557550_1788150759
    • tpch_adapted_1_official_557567_1788150759
    • tpch_adapted_1_official_557597_1788150759

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 8681fa2

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Fast test (arm_darwin) / 01599_multiline_input_and_singleline_comments hang, not caused by this PR: the test wedges past the 60 s cap and the runner logs Timeout! Killing process group 5170 then Got Operation not permitted while sending SIGKILL to 5170, leaving the expect child alive. 23 hits across 23 distinct PRs in 30 days, 0 on master #117053 (mine, merged 2026-08-29 21:37Z as f96f3e30) - absent from this tree, which is 60 commits behind that commit, so this build predates the fix
Stress test (amd_msan) / Logical error: Not-ready Set is passed as the second argument for function 'globalNotIn' trunk logical error, not caused by this PR: it fires across the tree independently of any one branch, 565 hits over 391 distinct PRs and 38 true-master commits in 30 days #102308 (external, open)
Stateless tests (arm_asan_ubsan, azure, parallel) / 01169_old_alter_partition_isolation_stress flaky, not caused by this PR: Code: 636 ... CANNOT_EXTRACT_TABLE_STRUCTURE raised by merge(currentDatabase(), '') once teardown has dropped the tables, surfacing as having stderror. The runner's own probe failed 0 out of 3 reruns. 3 hits across 3 unrelated PRs in 30 days, 0 on master #107883 (mine, open)
CH Inc sync private sync CH Inc sync (private, not actionable by me)

This PR cannot reach any of them: the diff is 5 files, ci/jobs/check_style.py,
src/Databases/DatabaseOnDisk.cpp and one 04603_columnless_view_metadata_no_server_abort test
trio, and none of the three failing tests touches view metadata or style checking.

On the 01169 row, #107883 is the owner rather than a coincidental same-test PR: it removes the
kill -TERM that orphans a clickhouse-client past teardown, and the query that failed here is the
one its thread_select loop runs. The error code differs from the UNKNOWN_TABLE and
UNKNOWN_DATABASE variants in its evidence only because merge() reports an empty match instead of
a missing name.

I have not merged master to pick up f96f3e30: this PR carries the manual approve label, so each
push spends a maintainer's workflow approval, and the other two rows have no merged fix, so a re-run
would still be red. The fix is named here instead.

Session id: cron:our-pr-ci-monitor:20260830-040000

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 258d7fb

Every failure below has an owner: a fixing PR, or a full-effort fix task whose fixing-PR link
will be posted here when it opens.

Check / test Reason Owner / fixing PR
Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6) / test_hedged_requests/test.py::test_receive_timeout1 Code: 209 SOCKET_TIMEOUT raised against node_3, the replica the test expects to answer; 1 failure out of 975 in that shard #112229 (ours, open)

The two 01599 and Not-ready Set rows of the previous ledger at 8681fa256fc8 are gone at this
head: #117053 merged as f96f3e30 and the master merge in 258d7fb7 picked it up.

Attribution, read from master rather than inferred from the pull request title. The exception text and
class come from exactly one place, HedgedConnections::resumePacketReceiver
(src/Client/HedgedConnections.cpp:470-474), reached from :463 when
PacketReceiver::isTimeoutExpired() is true and the offset has no other active connection. On master
that flag is latched in PacketReceiver::checkTimeout (src/Client/PacketReceiver.cpp:49) whenever
the timer descriptor is ready, including a wake where the socket is ready too and the packet is
therefore delivered normally, and setTimeout does not clear it. So isPacketReady
(src/Client/PacketReceiver.h:25, which tests !is_timeout_expired) stays false for the rest of that
connection's life even though packets keep arriving, and the next resume reports a receive timeout
against a replica that was answering. The :459 call to setTimeout on the packet-ready path already
carries the comment "Reset the socket timeout after some packet received", so the intent to re-arm per
packet is present and is defeated by the flag surviving it. #112229 makes the declaration conditional
on the socket not being ready in the same wake and clears the flag on re-arm.

This test is built to sit in that window: it sets node_3_sleep_in_send_data=1000 while querying with
receive_timeout=2, so node_3 legitimately delivers data one second at a time under a two second
budget, and node_1 and node_2 are already finished by design.

A slow sanitizer host genuinely exceeding the two second budget remains the alternative reading, and
this artifact cannot separate the two. The shard itself was healthy: 974 of 975 tests passed and it
finished in 110 minutes, so this is not the runner stall that this check has shown before.

Session id: cron:our-pr-ci-monitor:20260831-063000

@tavplubix tavplubix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a view now fails to load with a normal exception instead of terminating the whole server.

Don't the server fail to start anyway if it fails to load a table/view?

and its stored column list may legitimately be absent

Why? Is it actually legit?

@groeneai

Copy link
Copy Markdown
Collaborator Author

Both fair. Measured on a real server rather than argued from the loader.

"Don't the server fail to start anyway if it fails to load a table/view?"

Not with the default async_load_databases = 1. Every arm: Atomic database with a MergeTree table holding one row plus a view whose stored metadata has had its column list removed, then a restart.

binary startup other tables reading the broken view
master release 26.9.1.422, no fix accepting after 3s SELECT count() returns 1 49 LOGICAL_ERROR inside 722
master debug, no fix never accepts: Fatal ... Logical error, then Received signal 6 connection refused unreachable
master release + abort_on_logical_error=1, no fix never accepts, same fatal connection refused unreachable
this PR, CI amd_debug and amd_release builds of 258d7fb accepting after 3 to 5s returns 1 90 EMPTY_LIST_OF_COLUMNS_PASSED inside 722

With async_load_databases = 0 every arm dies during startup, patched or not, so there only the error text changes.

The difference is therefore confined to servers where LOGICAL_ERROR is fatal: debug and sanitizer builds, and anything started with abort_on_logical_error = 1, which tests/config/install.sh:246-248 installs for every functional and stress server except Fast test. That is where the original report came from, and there nothing is reachable, not only the broken view. On a default release server the process already survives and only the classification changes.

That it is the error class and not the failed load: on unfixed master the same missing-column-list condition on a non-view table (ENGINE = MergeTree) takes the sibling EMPTY_LIST_OF_COLUMNS_PASSED branch of the same function, and the debug server starts and keeps serving.

The sentence you quoted was too broad. I have narrowed the changelog and description to that scope.

"Is it actually legit?"

For parameterized views yes, which is why the first exemption exists: CREATE VIEW v AS SELECT {p:UInt8} AS x stores ATTACH VIEW _ UUID '...' AS SELECT {p:UInt8} AS x with no column list, and the 04227 view (parameters in a subquery under a JOIN) stores the same shape and re-attaches cleanly.

For a view not recognized as parameterized on reload I cannot exhibit a supported producer. On master: plain CREATE VIEW stores a column list, ATTACH VIEW ... AS SELECT is refused with Code: 36, ALTER TABLE <view> MODIFY QUERY is Code: 48 NOT_IMPLEMENTED for storage View, CREATE OR REPLACE VIEW over a parameterized view re-serializes with columns, and RENAME plus DETACH/ATTACH leave the stored text untouched. Both real occurrences are AST fuzzer mutations of parameterized views: test_5.prewhere_bug_view__fuzz_4 in July and test_3.date32_pv__fuzz_4 on 26.7 two days ago.

So "legitimately absent" is wrong. I replaced it with what I can back: corrupted or externally modified metadata should not abort the server. The code comment needs the same correction.

One gap, stated plainly: I have not root-caused how the fuzzer's copy of a parameterized view ends up with no column list while no longer satisfying isParameterizedView(). If you would rather that producer were found first, or you read the assertion as doing its job on unreadable metadata, say so and I will close this and chase the producer instead. Nothing pushed yet: the head carries another maintainer's commits, and a separate thread has an open question about reworking the regression test onto clickhouse-local --path.

@clickhouse-gh clickhouse-gh Bot added the comp-database-engines Database engine implementations (e.g., Atomic/Replicated) and database-level behavior. label Sep 4, 2026

This branch has not been deployed

No deployments
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-review-bot PR origin: review-bot finding on a groeneai PR manual approve Manual approve required to run CI pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants