Repository navigation
Conversation
…ir DROP forms `CREATE WORKLOAD` and `CREATE RESOURCE` were documented only in the workload scheduling guide, and the standalone `CREATE INDEX ... ON t`, `DROP INDEX ... ON t`, `DROP WORKLOAD` and `DROP RESOURCE` had no reference text, although the parsers accept them. `ParserCreateWorkloadQuery`, `ParserCreateResourceQuery` and `ParserCreateIndexQuery` get a documentation entry each and are registered, so `system.statements` exposes them and the docs autogeneration fills the new `create/workload.mdx`, `create/resource.mdx` and `create/skipping-index.mdx` pages. The `DROP` entry gains `DROP INDEX`, `DROP WORKLOAD` and `DROP RESOURCE` sections, the `CREATE` overview lists the new forms, and `ALTER TABLE ... INDEX` links the standalone statements. Each page and section states the version it was introduced in, measured on the first release tag of each version through the GitHub API: v22.7.0 for `CREATE INDEX`/`DROP INDEX`, v24.11.0 for the workload and resource statements, and per access mode v25.4.0 (`MASTER THREAD`, `WORKER THREAD`), v25.6.0 (`QUERY`) and v26.7.0 (`MEMORY RESERVATION`). No statement is behind an experimental setting; the pages mark memory reservation scheduling experimental, as the workload scheduling guide does. Every behaviour on the pages was observed on a server built from this branch, and the examples are copied from those runs. The generated regions are left to the autogeneration workflow. Related: ClickHouse#131085 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
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 blocker, 0 major, 2 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261114-153001 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-41:20261114-145700 |
|
Workflow [PR], commit [31de00e] Summary: ✅
AI ReviewSummaryAdds source-owned reference documentation for Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes9 object files changed (+60.33 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units17 translation units recompiled, 23 s compile time in total, 17 of them have a recent master baseline. |
serxa
left a comment
There was a problem hiding this comment.
This is good. Storage aspects are not covered though. But can be improved separately.
|
@groeneai tag me when it's ready to be merged |
|
CI has finished: everything is green except That blocker is real but predates this PR: with |
ClickHouse#126158 enabled clang-tidy `modernize-use-nodiscard` on master, so the three `getDocumentation` declarations this PR adds to ParserCreateIndexQuery, ParserCreateResourceQuery and ParserCreateWorkloadQuery would fail `Build (arm_tidy)` on the merge commit, as `ParserTransactionControl.h:12` already does on master. Same form as `ParserDropQuery::getDocumentation` there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ClickHouse#82414 was backported to 26.6 (ClickHouse#108687) and is listed in the 26.6 changelog: the parser accepts `MEMORY RESERVATION` in v26.6.2.81-stable but not in v26.6.1.1193-stable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r kind Workloads and resources share one name space in `WorkloadEntityStorageBase::entities`, and `removeEntity` looked the name up without checking that the stored entity is of the requested kind. With Keeper workload storage (`workload_zookeeper_path`), `removeEntityImpl` rewrites the single znode without that name, so `DROP WORKLOAD cpu` removed the resource `cpu` and `DROP RESOURCE x` removed the workload `x`. The interpreters only check the privilege of the statement's own kind, so a user granted only `DROP WORKLOAD` could remove resources and vice versa. Disk storage was safe only because its file name is kind-specific (`workload_<name>.sql` / `resource_<name>.sql`), so the same statement failed with "Workload entity 'cpu' doesn't exist". Treat an entity of the other kind as missing in the base class, which every storage goes through: the statement now fails the same way on every storage, and `IF EXISTS` is a no-op. The check sits inside the retry loop, so it is re-done after a Keeper version conflict. The sibling write path `storeEntity` already rejects a kind mismatch for `CREATE OR REPLACE`. Reported by the AI review on ClickHouse#131653 (ClickHouse#131653 (comment)). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@groeneai build is still broken, take care |
The previous run (375f67d) failed Build (arm_tidy) only on master's src/Parsers/ParserTransactionControl.h:12, fixed on master by ClickHouse#131891. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The red The open AI review thread is about the Keeper |
Related: #131085
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Document the
CREATE WORKLOAD,CREATE RESOURCEand standaloneCREATE INDEXstatements, andDROP WORKLOAD,DROP RESOURCEandDROP INDEX ... ON, in the SQL reference.Description
One of the PRs for the statements without reference documentation that @ Blargian asked for in #131085.
CREATE WORKLOADandCREATE RESOURCEwere described only in the workload scheduling guide; the standaloneCREATE INDEX ... ON t/DROP INDEX ... ON t,DROP WORKLOADandDROP RESOURCEhad no reference text.ParserCreateWorkloadQuery,ParserCreateResourceQueryandParserCreateIndexQueryget a documentation entry each and are registered, sosystem.statementsexposes them and the docs autogeneration fills the newcreate/workload.mdx,create/resource.mdxandcreate/skipping-index.mdx(frontmatter and empty markers, like #131085). TheDROPentry gainsDROP INDEX,DROP WORKLOADandDROP RESOURCEsections; theCREATEoverview lists the new forms andALTER TABLE ... INDEXlinks them; the guide's "See also" links the two new pages.Each page and section states the version it was introduced in, checked on the release tags: v22.7.0 for
CREATE INDEX/DROP INDEX, v24.11.0 for the workload and resource statements, and per access mode v25.4.0 (MASTER THREAD,WORKER THREAD), v25.6.0 (QUERY), v26.6.2 (MEMORY RESERVATION). No statement is behind an experimental setting; the pages mark memory reservation scheduling experimental, as the guide does.Validation: I checked every behaviour the pages describe on a server built from this branch (disk and Keeper workload storage, configuration-defined workloads, privileges), and the examples are copied from those runs. I regenerated the pages with
autogenerate_docs.py --write --only 'statement:'and ranlychee_check.py --mode links(0 errors; a corrupted anchor is reported),navigation_check.pyandcheck_autogenerated_regions.py; the committed tree contains no generated text.04926_system_statementsfails without the three new reference lines and passes with them.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131653]