Repository navigation
Show the history of changes of every setting in the /docs page - #112177
Conversation
The `/docs` page and the `help` command render the documentation of a setting from `system.documentation`, which showed only its description, type and default value: it did not say in which version the setting appeared or how its default value changed since. Append the recorded history of the default value of a setting to its documentation: the version in which the setting was introduced and every later change of its default, newest first, each with the previous value, the new value and the reason for the change. The data is the same that backs the `compatibility` setting and `system.settings_changes`, so it covers the changes recorded since that mechanism was introduced; an older setting whose default never changed has no history, and neither do server settings, which `compatibility` does not cover. Setting aliases carry a history of their own, which is the version in which the alias was added. The version that introduced a setting is called out separately, ahead of the list, when the history records it as such: a change from a value to itself has no effect on `compatibility` and exists only to register a setting that did not exist before. A setting introduced with a compatibility value that differs from its default is recorded as an ordinary change of the default and is indistinguishable from one, so it is reported as a change rather than claimed to be an introduction that the history does not actually record. This brings the built-in `/docs` page to parity with the website, where the autogenerated settings pages already render a `VersionHistory` table. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [dcfdbde] Summary: ✅
AI ReviewSummaryThis PR extends Final Verdict✅ Approve LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 138/141 (97.87%) · Uncovered code |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Related: #112183 — the website side of the same information. The autogenerated settings pages already emit a |
…equire the wording of an introduction
Two corrections to the history of the changes of the default value of a
setting, which `system.documentation` appends to its documentation.
The history was keyed by the name a change is recorded under, but
`compatibility` resolves the recorded name through `resolveName` before
applying it, so a change recorded under an alias of a setting belongs to
that setting as much as one recorded under its canonical name. Keying by
the raw name cut the history of a setting that was renamed at the
rename: `enable_full_text_index` showed only the `25.12` and `26.2`
records under its current name, and dropped the `24.6` record under
`allow_experimental_full_text_index`, which is where the setting
appeared. Index the history by the canonical name, listing a change that
is recorded under both a setting and an alias of it once, and keep the
index by the recorded name for the documentation of an alias, whose
history is the version in which the alias was added.
A record that does not change the default value was taken to be the
introduction of the setting. It is not: `SettingsChangesHistory.cpp`
also writes such a record to note something else about a setting that
already exists — the oldest record of `page_cache_block_size` is
`{1048576, 1048576, "Made this setting adjustable on a per-query
level."}`, which was rendered as `**Introduced in:** v25.5` and
`introduced with the default value`. The history has no structured
marker for an introduction, so require the wording that the file uses by
convention ("New setting", "A new compatibility setting", and, for an
alias, "Added an alias for ...") in addition to the value being
unchanged, and claim nothing when the wording says something else.
The test covers both: that the claimed introducing version is the oldest
recorded one and that the record does not change the default, that
`page_cache_block_size` claims no introducing version, and that the
history of `enable_full_text_index` still carries its `24.6` record.
… ones whose reason says "new setting" The reason of a record in `SettingsChangesHistory.cpp` is free-form, and a record that registers a new setting usually describes what the setting does rather than saying that it is new, so matching the wording of an introduction dropped most of them (`apply_row_policy_after_final`, `parallel_replicas_mode`, `use_skip_indexes_if_final_exact_mode`, ...). Recognize instead the small and formulaic set of phrasings the file uses when a record that changes nothing is about a setting that already existed - it became obsolete, it graduated to another maturity tier, it became settable per query - or adds an alias.
…ex literal The `cpp` style check flags a space followed by `)` even inside a raw string literal. Write the optional article in `became (?:the\s)?\w+ tier` with `\s` instead of a literal space; the regex is unchanged in meaning. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112177&sha=cbc817e7f5751e69aa12db5fd224f69b804a760e&name_0=PR&name_1=Style%20check #112177 Co-Authored-By: Claude Fable 5 <[email protected]>
…of the setting it aliases
A record written under an alias of a setting for the sole purpose of registering
that alias neither introduces the setting nor changes its default, so it is the
history of the alias alone. It was being folded into the history of the canonical
setting: `max_insert_block_size`, which predates the change history and has no
recorded change of its own, picked up the 26.1 record that registered its alias
`max_insert_block_size_rows` and claimed `**Introduced in:** v26.1`.
`buildSettingsHistory` now skips such a record when indexing `by_setting`, while
`by_recorded_name` keeps it as the history of the alias. Recognizing the reason
of an alias registration is factored out into `reasonRegistersAnAlias`, which also
learns the bare noun-phrase form the file uses ("An alias for max_insert_block_size.",
"Alias for setting 'use_partition_pruning'."). That form is anchored at the start
of a sentence, so a record that introduces a setting and mentions an alias of it
in passing ("New setting ... . 'y' is an alias for this setting.") is still not
mistaken for one. Nine records are excluded today, every one of them a genuine
alias registration.
`04652_system_documentation_settings_history` pins that `max_insert_block_size`
has neither a history nor an introducing version, while its alias
`max_insert_block_size_rows` has both.
…stered it under another name The history file is inconsistent about where the appearance of an alias is recorded, so `by_recorded_name` alone was not the history of an alias: `async_insert_busy_timeout_ms` was registered by a record written under the canonical `async_insert_busy_timeout_max_ms`, so it rendered with no history at all, and a setting renamed with its old name kept as an alias (`text_index_density_threshold`, `evaluation_time`, `allow_statistic_optimize`) had the rename itself recorded under the new name and therefore missing from the old name's history. The index is now `by_alias` — every record written under the alias plus every record written under another name of the same setting that registers this one as an alias: a record that changes nothing, names the alias as a whole word, and says either that an alias is being added or that the setting is being renamed, which is how the file words keeping the old name. The test pins one case of each shape and applies the same rule in SQL.
…e name `addSettingHistoryEntry` de-duplicated on `(version, previous_value, new_value)` alone, which also merged two distinct records written under the same recorded name — `enable_max_bytes_limit_for_min_age_to_force_merge` has two 25.1 records with the same values but differently authored reasons, and the second one overwrote the first, dropping the more specific reason from `system.documentation`. Coalescing is meant only for the canonical/alias twins of one change, so the de-duplication now additionally requires the recorded names to differ. The test's bullet-count oracle mirrors this (per `(version, previous_value, new_value)` group, one bullet per record of the most-recorded name), and the affected `MergeTree` setting is pinned in the test.
|
🕵 @groeneai, investigate two stress-test failures that are unrelated to this PR (each signature hit many unrelated PRs and master over the past days) and provide fixes in separate PRs. If a fix is already in progress, link it here.
The third red, Stress test (arm_tsan) |
|
Investigated both. Item 1 has a fixing PR; item 2 is a new bug I root-caused and reproduced, and I will open a separate PR for it. 1. STID 2508-30f6 (amd_tsan) - fixing PR #107957The stack in that report lands on the exact line #107957 changes: Your breadth read is right. Keyed on the stack frame rather than the assertion text ( One measurement note: #101105 made #107957 has been open since 2026-06-19 with no human review yet. 2. arm_release
|
| arguments | error |
|---|---|
Remote(nc_missing, database = merge(...)) |
Code 46 Function with name \merge` does not exist` |
Remote(nc_missing, sharding_key = rand()) |
Code 47 Unknown expression or function identifier \sharding_key`` |
remote(nc_missing) |
Code 701 Requested cluster 'nc_missing' not found |
The remote table function reproduces it identically, so the fix belongs in the shared parser and covers both it and the engines. For context, 24 of the 26 call sites of tryGetNamedCollectionWithOverrides pass throw_unknown_collection = true; this parser and StorageURL.cpp:2163 are the two exceptions.
04511_remote_named_collection_complex_overrides is the carrier, not the cause: it creates this exact shape and drops its collections at the end, so a stress run interrupted mid-test leaves the metadata on disk with the collection gone.
Two open pull requests are adjacent but neither covers this: #112805 removes one route to a missing collection (dropping one while a dependent table is detached) but does not touch the parser, and a collection can still go missing by other means; #110529 makes startup tolerate a missing collection for the URL engine only. I will open a separate pull request for the parser and link it here.
|
Opened as #113510. One correction to what I wrote above, since it was the basis for the obvious fix and that fix What distinguishes the two shapes without resolving anything is the second argument: a The check is deliberately restricted to Scope, to be explicit: this fixes the parse and the error, not startup survival. A The parser file exists on |
|
🕵 Merged The two current CI reds are unrelated stress-test signatures, both with fixes already in flight:
|
|
🕵 Re-checked the CI for the current head 2473585: the only two reds are unrelated stress-test signatures, both fleet-wide and both with fixes already open:
No unresolved review threads, AI review is green ("No new findings") on this head. Nothing in this PR touches joins or pipelines; it is ready for merge, or for a re-run once the fixes above land. |
|
🕵 Merged
Rebuilt ( |
Build profile diff (arm_release)No arm_release build profile data for commit dcfdbde - the build was skipped, reused from cache, or predates profile upload. |
Address review: the history of a setting was stitched across its names only through `SettingsCollection::resolveName`, which knows the names a setting has today. A rename keeps the old name as an alias only sometimes; when it does not, the history recorded under the old name was stranded there, and the rename record itself — a record that changes nothing — was taken for the introduction of the setting, claiming a version in which the setting demonstrably already existed. `distributed_cache_alignment` listed only its `25.7` rename and claimed to be introduced in it, while its `24.10` appearance stayed under the obsolete `distributed_cache_read_alignment`, and `filesystem_cache_skip_download_if_exceeds_per_query_cache_write_limit` claimed `24.11`, the version of its rename. `buildRenames` recovers the missing names from the only account of such a rename there is — the reason of the record, written either under the new name (`Rename of x`, `Renamed from x`, `New name of x`, `The setting was renamed. The previous name is x`) or under the old one (`Obsolete setting, renamed to x`) — and drops the pairs the aliases already cover. A record written under a name a setting was renamed from is added to the history of the setting as it is named today, and kept under the old name as well, so that a name which is still a setting of its own keeps its own account of the change. Exactly four renames are recovered today, all verified by hand. Reasons that note a rename no longer record an introduction. The test gains the same mapping in its oracle (`session_renames`), so the bullet counts and the introducing versions stay checked against the history data, plus the three shapes of the rename: the recovered pre-rename history, a rename whose old name has no record of its own, and a rename recorded under the old name.
|
🕵 The two CI reds on the current head 7107b47 are both stress-test hung checks, unrelated to this PR (which only changes the rendering of
@groeneai, investigate failure 2 and provide a fix in a separate PR. If a fix is already in progress, link it here. The AI review verdict on this head is ✅ Approve with no unresolved threads; the branch will be remerged with |
|
Failure 2 is the retry loop in It is the loop, not one stuck read: the hung row sent 16 HTTP requests ( #112930 covers the odbc spelling of it, not just No separate PR from me then. #112144 was my earlier attempt at this and it is closed in favour of #112930 at my own recommendation. #66656 is the same defect on the same code path, so the missing issue is really the odbc-bridge spelling of that one, and #112930 closes both. |
The
/docspage and thehelpcommand render the documentation of a setting fromsystem.documentation, which showed only its description, type and default value: it did not say in which version the setting appeared or how its default value changed since.This appends the recorded history of the default value of a setting to its documentation — the version in which the setting was introduced and every later change of its default, newest first, each with the previous value, the new value and the reason for the change:
The data is the same that backs the
compatibilitysetting andsystem.settings_changes, so it covers the changes recorded since that mechanism was introduced; an older setting whose default never changed has no history, and neither do server settings, whichcompatibilitydoes not cover.The version that introduced a setting is called out separately, ahead of the list, when the history records it as such. A record that does not change the default value has no effect on
compatibilityand is written either to register a setting that did not exist before, or to note something else about a setting that already exists (page_cache_block_sizehas a record that only says it became adjustable per query), and the history has no structured marker to tell the two apart — so the wording of the reason has to say so as well ("New setting", "A new compatibility setting", and, for an alias, "Added an alias for ..."). When it says something else, no introducing version is claimed: a wrong version is worse than none. A setting introduced with a compatibility value that differs from its default is recorded as an ordinary change of the default and is indistinguishable from one, so it is reported as a change too.The history is indexed by the canonical name of a setting:
compatibilityresolves the recorded name of every change throughresolveNamebefore applying it, so a change recorded under an alias belongs to the history of the setting it resolves to — without this, the history of a setting that was renamed would be cut at the rename (enable_full_text_indexwould lose the 24.6 record written underallow_experimental_full_text_index). A change recorded under both a setting and an alias of it is listed once. An alias keeps a history of its own — the history of that name: every record written under the alias, plus the record that registered it as an alias, which the history file sometimes writes under another name of the same setting (async_insert_busy_timeout_mswas registered by a record under the canonicalasync_insert_busy_timeout_max_ms, and a setting renamed with its old name kept as an alias, such astext_index_density_threshold, has the rename recorded under the new name). A record written under an alias for the sole purpose of registering that alias is the history of the alias alone: it neither introduces the setting it aliases nor changes its default, so it is excluded from the history of that setting — without this,max_insert_block_size, which predates the change history and has no recorded change of its own, would pick up the 26.1 record that registeredmax_insert_block_size_rowsand claim to have been introduced in that version.resolveNameknows only the names a setting has today, and a rename keeps the old name as an alias only sometimes:distributed_cache_read_alignmentbecamedistributed_cache_alignmentin 25.7 and was made obsolete rather than kept as an alias. The only account of such a rename is the reason of a record — written either under the new name (Rename of x,Renamed from x,New name of x,The setting was renamed. The previous name is x) or under the old one (Obsolete setting, renamed to x) — so those names are recovered from it, and a record written under a name the setting was renamed from is history of the setting as it is named today as well (it is kept under the old name too, so an obsolete setting keeps its own account of the change). Four renames are recovered today. A reason that notes a rename never records an introduction, whether or not the pre-rename history can be recovered: the setting existed before under another name, so claiming the version of the rename —24.11forfilesystem_cache_skip_download_if_exceeds_per_query_cache_write_limit, whose old name has no record of its own — would be exactly the wrong answer.The autogenerated settings pages on the website emit a
VersionHistorycomponent with the same data, but it currently renders nothing on the Mintlify site: the deployed pages use<VersionHistory .../>without the component ever being defined on the page (unlikeSettingsInfoBlock, which is inlined correctly), so MDX drops it — there is no version-history table in the DOM of any session, MergeTree or format settings page. Until that is fixed, the built-in/docspage is the only place this information is visible.The change is entirely in
system.documentation, so it also shows up in thehelp/mancommand of the client.04357_system_documentation_tablecompares only the first line of an alias description now, because the history of the alias follows it.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The documentation of a setting in
system.documentation— shown by the built-in/docspage and by thehelpcommand — now includes the history of the changes of its default value: the version in which the setting was introduced and every later change of its default, with the previous value, the new value and the reason for the change.Documentation entry for user-facing changes