Skip to content

Show the history of changes of every setting in the /docs page - #112177

Merged
alexey-milovidov merged 22 commits into
masterfrom
docs-settings-change-history
Aug 12, 2026
Merged

alexey-milovidov merged 22 commits into
masterfrom
docs-settings-change-history

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

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.

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:

**Type:** `UInt64`

**Default:** `100000`

**Introduced in:** v25.3

**History**

- **25.5** — the default value changed from `0` to `100000`. New setting
- **25.4** — the default value remained `0`. New setting
- **25.3** — introduced with the default value `0`. New setting

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.
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 compatibility and 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_size has 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: compatibility resolves the recorded name of every change through resolveName before 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_index would lose the 24.6 record written under allow_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_ms was registered by a record under the canonical async_insert_busy_timeout_max_ms, and a setting renamed with its old name kept as an alias, such as text_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 registered max_insert_block_size_rows and claim to have been introduced in that version.

resolveName knows only the names a setting has today, and a rename keeps the old name as an alias only sometimes: distributed_cache_read_alignment became distributed_cache_alignment in 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.11 for filesystem_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 VersionHistory component 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 (unlike SettingsInfoBlock, 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 /docs page is the only place this information is visible.

The change is entirely in system.documentation, so it also shows up in the help/man command of the client.

04357_system_documentation_table compares only the first line of an alias description now, because the history of the alias follows it.

Changelog category (leave one):

  • Improvement

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 /docs page and by the help command — 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

  • Documentation is written (mandatory for new features)

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]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [dcfdbde]

Summary: ✅


AI Review

Summary

This PR extends system.documentation so setting docs include default-value history, alias/rename stitching, and the supporting docs/tests. I reviewed the current diff against the prior review threads and the current code, and I did not find any remaining correctness, compatibility, or evidence gaps that warrant a new review comment. The latest Praktika report for PR #112177 is all green.

Final Verdict

✅ Approve

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.70% 86.70% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 79.00% 79.00% +0.00%

Changed lines: Changed C/C++ lines covered: 138/141 (97.87%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Jul 27, 2026
@mintlify

mintlify Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟢 Ready View Preview Jul 27, 2026, 8:12 PM

@alexey-milovidov

Copy link
Copy Markdown
Member Author

Related: #112183 — the website side of the same information. The autogenerated settings pages already emit a VersionHistory component with this data, but it currently renders nothing; that pull request makes the component self-contained so it does.

…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.
alexey-milovidov and others added 2 commits July 31, 2026 08:18
…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]>
@alexey-milovidov
alexey-milovidov requested a review from a team as a code owner July 31, 2026 08:28
…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.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 @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.

  1. Stress test (amd_tsan): Logical error (isConst() || isSparse() || isReplicated() || rhs.isConst() || rhs.isSparse() || rhs.isReplicated()) ? getDataType() == rhs.getDataType() : typeid(*this) == typeid(rhs) (STID: 2508-30f6) — https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112177&sha=30292276df5206fb4ce9839a1c14678ff9f09943&name_0=PR&name_1=Stress%20test%20%28amd_tsan%29 — no tracking issue found.

  2. Stress test (arm_release): Cannot start clickhouse-server — metadata loading fails with Function with name merge does not exist. In scope database = merge(...) while attaching ENGINE = Remote(nc_remote_bare_test_1, database = merge(...)) — https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112177&sha=30292276df5206fb4ce9839a1c14678ff9f09943&name_0=PR&name_1=Stress%20test%20%28arm_release%29 — no tracking issue found; likely related to the Remote database/named-collection support.

The third red, Stress test (arm_tsan) Logical error: column->size() == num_rows, is already tracked in #113411.

@groeneai

groeneai commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

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 #107957

The stack in that report lands on the exact line #107957 changes: IColumn::assertTypeEquality (IColumn.h:941) via inlined insertFrom (IColumn.h:255) from buildAdditionalFilter at HashJoinMethodsImpl.h:807, reached through joinRightColumnsWithAdditionalFilter (:997) and SpillingHashJoin::joinBlock (:312). #107957 replaces the bare col->insertFrom(*src_col, row_pos) there with nullability reconciliation: a non-equi ON conjunct becomes a residual filter whose required-column types reference the raw right inputs as non-Nullable, while under join_use_nulls with an outer join the saved right block carries the column as Nullable.

Your breadth read is right. Keyed on the stack frame rather than the assertion text (HashJoinMethodsImpl.h plus assertTypeEquality), CIDB shows 44 rows across 37 distinct pull requests and 4 master runs in the last 14 days, spanning 10 build variants (arm_tsan 10 including 2 master, arm_debug 9, amd_debug 5, amd_tsan 5, amd_msan 5, arm_msan 3, amd_asan_ubsan 3 including 1 master, arm_asan_ubsan 2, azure amd_tsan 1 master, arm_asan_ubsan+s3 1).

One measurement note: #101105 made assertTypeEquality symmetric, so what fires now is the post-fix symmetric form you quoted. A census keyed on the older asymmetric text or on the STID alone undercounts this family by roughly 28x.

#107957 has been open since 2026-06-19 with no human review yet.

2. arm_release Cannot start clickhouse-server - new bug, root cause found

Correction on breadth first: this one is a single occurrence, not many. In 30 days CIDB has 1 row for Function with name \merge` does not exist(this pull request, 0 master), against 504 rows / 324 pull requests / 46 master forCannot start clickhouse-server` overall, so the predicate is working and the 1 is real. An earlier check of mine missed it entirely because I searched the phrase without the backticks.

Root cause is in the shared remote-arguments parser, at parseRemoteFunctionArguments.cpp:91:

tryGetNamedCollectionWithOverrides(args, context, /* throw_unknown_collection = */ false, ...)

With throw_unknown_collection = false, a missing collection returns nullptr, the named-collection branch is skipped, and parsing silently falls through to the positional branch. There it reinterprets the arguments: database = merge(...) becomes an ordinary data expression, merge is resolved against FunctionFactory instead of TableFunctionFactory, and you get Code 46. Since ATTACH replays metadata through the same path as startup loading, this turns into Cannot start clickhouse-server.

The positional branch cannot ever parse a named-collection call correctly, because args[0] is an identifier. Reproduced on master (26.8.1.1), byte-identical message:

CREATE NAMED COLLECTION nc_bare AS host = '127.0.0.1', port = 9000;
CREATE TABLE d1.t_tf ENGINE = Remote(nc_bare, database = merge('d1', '^nc_target$'));
SELECT count() FROM d1.t_tf;   -- 3, fine
DETACH TABLE d1.t_tf;
DROP NAMED COLLECTION nc_bare;
ATTACH TABLE d1.t_tf;
-- Code: 46. Function with name `merge` does not exist. In scope database = merge('d1', '^nc_target$').

Recreating the collection makes ATTACH succeed again, so it is the missing collection and not a formatter round-trip; SHOW CREATE round-trips correctly. The same condition produces three different errors depending on the argument shape, none of which mentions named collections:

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.

@groeneai

groeneai commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Opened as #113510.

One correction to what I wrote above, since it was the basis for the obvious fix and that fix
turned out to be wrong. I said the positional branch "cannot ever parse a named-collection call
correctly, because args[0] is an identifier". The second half does not follow: a bare identifier
first argument is also how a cluster name is passed, so the fall-through is load-bearing for
remote(<cluster>, ...) and the lookup cannot simply be made fatal. Eleven test files under
tests/queries/0_stateless rely on that form, and test_shard_localhost is a cluster, not a
collection. That is also the answer to why the false is there.

What distinguishes the two shapes without resolving anything is the second argument: a
key = value pair is an equals function, and no positional signature accepts one there, because
args[1] is consumed as the database/table before the credentials and sharding-key block. So the
lookup is made fatal exactly for that shape and NamedCollectionFactory::get raises the existing
NAMED_COLLECTION_DOESNT_EXIST. One expression, one file.

The check is deliberately restricted to args[1] rather than any later argument: sharding_key
takes an arbitrary AST, so remote(cluster, db, table, x = 1) is a valid positional call whose
sharding key is an equality expression. A broader scan would reject it, and a test arm plus a
mutant pin that.

Scope, to be explicit: this fixes the parse and the error, not startup survival. A Remote table
whose collection is gone still throws at load time, now naming the right thing. Startup tolerance
is #110529's mechanism and StorageURL.cpp is left alone.

The parser file exists on master and 26.7 only, so if you want this in 26.7 it needs a
v26.7-must-backport label; I have not applied one.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master (branch was ~630 commits behind) and re-verified 04652_system_documentation_settings_history against the freshly built binary — exact match with the reference, no history changes needed.

The two current CI reds are unrelated stress-test signatures, both with fixes already in flight:

  1. Stress test (arm_release): Logical error: Shard number is greater than shard count in prepareClusterForParallelReplicas — hits master and ~10 unrelated PRs over the last days; fix in progress: Bind the parallel replicas shard scope to the cluster that produced it #113589
  2. Stress test (arm_asan_ubsan, s3): UBSan signed integer overflow in condition_variable::wait_for via ConcurrentBoundedQueue::popImpl — long-standing; fix in progress: Fix signed integer overflow in condition_variable::wait_for with huge timeouts #106961

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 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:

  1. Stress test (amd_asan_ubsan): Logical error (isConst() || isSparse() || isReplicated() || ...) ? getDataType() == rhs.getDataType() : typeid(*this) == typeid(rhs) in buildAdditionalFilter (HashJoinMethodsImpl.h). This signature hit master and dozens of unrelated PRs daily over the past days (38–55 failures/day in the CI DB). Fix: Fix a mixed JOIN ON condition evaluated over mismatched column types for a dictionary #113534 (planning-layer fix superseding Fix LOGICAL_ERROR in HashJoin::buildAdditionalFilter with join_use_nulls and a non-equi JOIN condition #107957, which analyzed this exact stack).
  2. Stress test (amd_tsan): Logical error Join is supported only for pipelines with one output port, got 2 and 1 in QueryPipelineBuilder::joinPipelinesYShaped. This signature hit ~10 unrelated PRs over the past 10 days. Fix: Fix LOGICAL_ERROR in full_sorting_merge JOIN when sharding stream counts diverge #109393.

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.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master again (branch was ~250 commits behind). The motivation: one of the two unrelated stress reds on the previous head — the getDataType() == rhs.getDataType() logical error in buildAdditionalFilter — is fixed by #113534, which has now merged, so merging master pulls the fix in and should clear that red. The other one (Join is supported only for pipelines with one output port in joinPipelinesYShaped, fix #109393) is still open.

master added several new records to SettingsChangesHistory.cpp in this window, including two that exercise the exclusion heuristics of this pull request: use_projection_index_in_read_pools (Obsolete setting, renamed to ...) and allow_delta_kernel_rs (New name of ..., which is no longer experimental and is kept as an alias). Both are correctly excluded from introduction detection, and the allow_delta_kernel_rs / allow_experimental_delta_kernel_rs pair is handled by the canonical/alias coalescing.

Rebuilt (ninja clickhouse, EXIT=0) and re-ran 04652_system_documentation_settings_history with the built binary: all consistency counts still 0 and the reference matches exactly, nothing to regenerate. AI review is green ("No new findings") and there are no unresolved review threads.

@clickhouse-gh

clickhouse-gh Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

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.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 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 system.documentation):

  1. Stress test (arm_tsan): the hung query is DROP TABLE prometheus with DROP DATABASE ... SYNC / DETACH DATABASE piled up behind it on the DDLGuard — exactly issue Unkillable synchronous DROP of a table with inner tables: the inner drop waits in waitTableFinallyDropped without a process-list element (stress hung check: DROP TABLE prometheus) #114259, part of the fleet-wide hung-check storm since 2026-08-10 (327 failures across 163 PRs and 51 on master on that day alone). Fixes are in flight: Fix inner table drop hang #114302 and the revert Revert the PromQL topk/limitk streaming plan and its shared-subquery materialization #114326, both still open — so merging master now would reproduce the same red. Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112177&sha=7107b479d314cdfad1806f56e92b9de1d706afec&name_0=PR&name_1=Stress%20test%20%28arm_tsan%29

  2. Stress test (amd_tsan): the hung query is an internal AST-fuzzer-executed SELECT x, y, z FROM odbc(...) (log comment 01086_odbc_roundtrip.sh), stuck for 394 s in Poco::Net::HTTPSession::receive reading the odbc-bridge HTTP response via ReadWriteBufferFromHTTP::initialize under StorageURLSource::generate, despite max_execution_time=10 — an uninterruptible HTTP read, the same shape as the known "unstoppable url function" issue url function is unstoppable (and it is not good:) #66656, but on the odbc-bridge path. I found no open issue for it. Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112177&sha=7107b479d314cdfad1806f56e92b9de1d706afec&name_0=PR&name_1=Stress%20test%20%28amd_tsan%29

@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 master once a fix for the hung-check storm lands.

@groeneai

Copy link
Copy Markdown
Collaborator

Failure 2 is the retry loop in ReadWriteBufferFromHTTP::doWithRetries, and the fix already in progress is your own #112930.

It is the loop, not one stuck read: the hung row sent 16 HTTP requests (ReadWriteBufferFromHTTPRequestsSent: 16, 13 connections created, 12 reset) for 0 rows read, and its http_receive_timeout is 60, so Poco::Net::SocketImpl::receiveBytes cannot block 394 s in one call. It throws TimeoutException, a Poco::RuntimeException, which lands in the catch (Poco::Exception &) arm that leaves is_retriable true. With this query's http_max_tries=10 the budget is 10x60 s of reads plus 32.7 s of backoff, so 394 s is around the 7th attempt. Master's doWithRetries never asks whether the query is still alive and waits with sleepForMilliseconds, so is_cancelled=1 and max_execution_time=10 do nothing until the attempts run out.

#112930 covers the odbc spelling of it, not just url: the cancellation flag is owned by StorageURLSource (StorageURL.h:303) and passed unconditionally via .withCancellation (StorageURL.cpp:787), and StorageXDBC::read delegates to IStorageURLBase::read (StorageXDBC.cpp:133) without constructing a read buffer of its own, so an odbc() read is a StorageURLSource read. Presence probe on src/IO/ReadWriteBufferFromHTTP.cpp, with doWithRetries as a control: checkIfNotCancelled is 2 at #112930's head 516d4630f535, 0 on master dab347c4d41f, 0 on the failing head 7107b479 (control 4 on all three). So the failing build predates the fix and the defect is still live in trunk.

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.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Aug 12, 2026
Merged via the queue into master with commit bbe3755 Aug 12, 2026
181 checks passed
@alexey-milovidov
alexey-milovidov deleted the docs-settings-change-history branch August 12, 2026 14:25
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 12, 2026

This branch was successfully deployed

1 active deployment
staging - docs — dcfdbded Deployed Aug 12, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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.

4 participants