Repository navigation
Add embedded documentation and a system table for disk types - #106187
Conversation
There was no system table exposing the available disk types (`system.disks` lists configured disk instances, not types). This adds `system.disk_types`, and attaches the shared `Documentation` struct (introduced for table engines) to disk types. - `DiskFactory::registerDiskType` now takes a final `Documentation` argument, stored in a per-type map, with `getAllRegisteredNames` and `getDocumentation` accessors. - The new `system.disk_types` table exposes `name` and the embedded documentation columns `description`, `syntax`, `examples`, `introduced_in`, and `related`. - All 12 disk types (`local`, `encrypted`, `cache`, `object_storage`, `s3`, `s3_plain`, `s3_with_keeper`, `s3_plain_rewritable`, `hdfs`, `azure_blob_storage`, `local_blob_storage`, `web`) get a description and syntax. This is a follow-up to the embedded-documentation changes for table engines, database engines, data types, formats, dictionary layouts/sources, aggregate function combinators, and data skipping index types, and reuses the `Documentation` struct from `src/Common/Documentation.h`. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Workflow [PR], commit [2ce4ba8] Summary: ✅
AI ReviewSummaryThis PR adds embedded documentation for disk types and exposes it through the new Findings💡 Nits
Final VerdictStatus: ✅ Approve Minimum required actions: none for correctness. |
- Restrict `04307_disk_types_documentation` to disk types that are always present regardless of build options. The `encrypted` disk type requires `USE_SSL`, which is disabled in the Fast test build, so the test failed with "result differs with reference". - Clear `documentations` together with `registry` in `DiskFactory::clearRegistry` so the factory has one coherent registered-state lifecycle (otherwise stale documentation survives a `clearDiskRegistry` + `registerDisks` cycle because the `emplace` keeps the old value for already-present keys). - Add `disk_types` to the always-accessible system table list in `ContextAccess.cpp` so that, like its sibling introspection tables, it can be queried with implicit `SELECT` when `select_from_system_db_requires_grant` is enabled, and update the `03247_show_grants_with_implicit` reference. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…entation Add a build-option-independent assertion to 04307_disk_types_documentation that every row in system.disk_types (including optional backends like s3, hdfs, or azure_blob_storage when compiled in) has a non-empty description and syntax, complementing the existing existence check for the always-present core disk types. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
The failures of They were introduced by #104690 ("Add #104690 was merged in violation of the ClickHouse team rules: its own CI already showed these two tests failing (10 times between May 12 and June 1) before it was merged. Please update your branch to pick up the revert; the tests should pass again. |
…tion # Conflicts: # src/Storages/System/attachSystemTables.cpp
|
Merged the latest `master` (the branch was 635 commits behind and red). Resolved the sole conflict in `src/Storages/System/attachSystemTables.cpp` — an add/add collision where `master` added `data_skipping_index_types` (#106186) on the line adjacent to this PR's `disk_types`; kept both `attach<...>` lines. Rebuilt cleanly and verified `system.disk_types` after the merge: all 12 disk types (`local`, `encrypted`, `cache`, `object_storage`, `s3`, `s3_plain`, `s3_with_keeper`, `s3_plain_rewritable`, `hdfs`, `azure_blob_storage`, `local_blob_storage`, `web`) expose a non-empty `description` and `syntax`, and `04307_disk_types_documentation` matches its reference. The only CI failure is unrelated to this PR: |
|
In the documentation, we should provide examples both for the static (xml/yaml) configuration and the dynamic configuration. Examples for the static configuration should go first. |
Address review feedback: the documentation should provide examples for both the static (XML/YAML) configuration and the dynamic configuration, with the static configuration shown first. The `examples` column of `system.disk_types` is rendered through `Documentation::examplesAsString`, which emits a SQL query / response pair and is therefore unsuited to static XML/YAML configuration snippets. The natural home for the static-vs-dynamic examples is the hand-written `disk_types.md` page, where a new "Configuration examples" section now shows, in order: a static `s3` disk in XML, the same in YAML, a table using it via a storage policy, and finally the equivalent dynamic configuration using the `disk` function. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Done in 48e07cc. Added a Configuration examples section to
Static configuration goes first, as requested. Note on the embedded |
|
Merged The only red was @groeneai, could you investigate the |
|
@alexey-milovidov fix opened in #106679: lowered The previous 1.2x margin between observed aggregator memory (~12 MiB) and the 10 MB limit is too thin: certain randomizations on The regression target from issue #93465 (server crash in ROLLUP+TOTALS memory-limit handling) is still exercised - any clean |
Lower `max_memory_usage` from 10 MB to 1 MB so the expected `MEMORY_LIMIT_EXCEEDED` exception is hit deterministically. The previous limit (10 MB) sat just below the observed aggregator footprint of ~12 MiB. The 1.2x margin is too thin: certain randomized settings (in `Stateless tests (amd_debug, distributed plan, s3 storage, parallel)` and `Fast test`) shave off 2-3 MiB and let the query slip under the limit, so `MEMORY_LIMIT_EXCEEDED` is never thrown and the test fails with "query succeeded but server error 241 was expected". With a 1 MB limit the aggregator footprint (5-6 MiB observed locally across 50 random setting combinations) is firmly above the threshold, so the exception fires deterministically. The regression target from issue ClickHouse#93465 (server crash inside ROLLUP+TOTALS memory-limit handling) is still exercised: any `MEMORY_LIMIT_EXCEEDED` thrown cleanly proves the crash path is not reached. Requested by @ alexey-milovidov on ClickHouse#106187 Related: ClickHouse#93465 Co-Authored-By: Claude Opus 4.8 <[email protected]>
…tion # Conflicts: # src/Storages/System/attachSystemTables.cpp
|
Merged |
…eeper` metadata storage The `keeper` metadata storage type is registered only in ClickHouse Cloud builds, so the `s3_with_keeper` disk type advertised by `system.disk_types` is not usable in other builds: creating it fails with an `unknown metadata storage type: keeper` error. State this explicitly in the embedded documentation instead of changing the registration, because the disk type itself was registered unconditionally before this PR as well. Co-Authored-By: Claude Fable 5 <[email protected]>
|
@groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106187&sha=56bb7937ae5ed9a3f7f19ca2ed6dba2bdb43073d&name_0=PR&name_1=Stateless%20tests%20%28arm_asan_ubsan%2C%20azure%2C%20parallel%29 and provide a fix in a separate PR. If the fix is already in progress, link it here. All 76 failures in this job happened within a four-minute window (04:04–04:08) with |
|
@alexey-milovidov Investigated. Your triage is correct: this is a runner-wide memory-exhaustion event, not caused by this PR, and the root-cause mitigation is already merged. The 76 failures (SHA 56bb793): all graceful, no crash. Breakdown: 44x Unrelated to
The same failure class hit master and ~94 distinct unrelated PRs on 06-10. Same systemic event is also tracked on #106177 (q23 OOM victim) and in #101843. Fix already merged: #106962 (Algunenano, 2026-06-11 16:38Z) tags the heaviest offender
So no separate PR is warranted from me, the root-cause test tag already landed in #106962. Happy to tag additional heavy tests session cron:clickhouse-worker-slot-1:20260611-234400 |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 108/109 (99.08%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 2 line(s) · Uncovered code |
|
Ok for now, but needs follow-ups. |
|
@groeneai, do a follow-up PR:
|
Part of the series adding embedded, runtime-introspectable documentation to ClickHouse component registries (table engines #106177, database engines #106178, data types #106180, formats #106181, dictionary layouts #106182, dictionary sources #106184, aggregate function combinators #106185, data skipping index types #106186). This one covers disk types (which include the object-storage backends) — and, since there was no system table for them, adds one.
What it does:
system.disk_typestable listing every disk type with embedded documentation columnsdescription,syntax,examples,introduced_in, andrelated. (This complementssystem.disks, which lists the disk instances configured on the server.)Documentationstruct (src/Common/Documentation.h) throughDiskFactory::registerDiskType, stores it in a per-type map, and addsgetAllRegisteredNamesandgetDocumentationaccessors.local,encrypted,cache,object_storage,s3,s3_plain,s3_with_keeper,s3_plain_rewritable,hdfs,azure_blob_storage,local_blob_storage,web.Note: this PR shares
src/Common/Documentation.h/.cppwith the earlier PRs in the series (trivial add/add on merge).Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Added a new
system.disk_typestable that lists the available disk types together with embedded documentation (description,syntax,examples,introduced_in,related).Documentation entry for user-facing changes
system.disk_typesand a newsystem.disk_typessystem-table page).