Skip to content

Throw on unknown configuration option in server config - #100332

Merged
alexey-milovidov merged 177 commits into
masterfrom
throw-on-unknown-config-option
Aug 10, 2026
Merged

alexey-milovidov merged 177 commits into
masterfrom
throw-on-unknown-config-option

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Mar 22, 2026 •

Copy link
Copy Markdown
Member

Previously, wrong or misspelled configuration entries in the server config were silently ignored, making it hard to diagnose configuration issues (e.g., <max_thred_pool_size> would be silently ignored instead of alerting the user).

Added ServerSettings::checkUnknownSettings that validates all top-level config keys against known ServerSettings entries and a comprehensive list of known complex config sections. Throws UNKNOWN_ELEMENT_IN_CONFIG if an unrecognized key is found.

The check runs on both server startup and config reload. It respects the existing <skip_check_for_incorrect_settings> escape hatch.

Known keys come from three sources:

  • ServerSettings scalar setting names (settings without paths)
  • Top-level prefixes from ServerSettings path-based settings (e.g., logger, openSSL, distributed_ddl)
  • A static list of ~170 known complex config sections (ports, clusters, storage, access control, system log tables, engine-specific sections, etc.)
  • Prefix-based matching for user-defined sections (e.g., graphite_rollup_*, http_handlers_*)

Sections referenced from elsewhere in the config (incl substitutions, config:// references in HTTP handlers, custom protocol handler sections, and top-level tags of include_from source files kept under config.d/) are exempt from the check.

Known limitation (ZooKeeper-backed substitutions): resolving a from_zk substitution would require a ZooKeeper connection at config-validation time, before the <zookeeper> section itself has been validated, so:

  • If <include_from> is specified with a from_zk substitution inside a users-config fragment and its source file is kept under config.d/, the source's top-level tags are not exempted. Such setups can either move the substitution source out of config.d/ or set <skip_check_for_incorrect_settings>.
  • If the server config contains a top-level <include from_zk=.../> (which imports the referenced ZooKeeper node's children as top-level keys), the whole check is skipped for that config, with a warning, so a valid config is never rejected — but a genuine typo alongside such an include is not caught.

Literal paths, from_env (including a top-level <include from_env=.../>), the default /etc/metrika.xml substitution source, and incl in the main server config are all covered.

Changelog category (leave one):

  • Backward Incompatible Change

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

The server now refuses to start (and rejects SYSTEM RELOAD CONFIG) when the server config contains an unknown top-level element, instead of silently ignoring it. Audit your config before upgrading: stale sections left over from older versions, sections consumed by forks/third-party tooling, and no-op marker sections will now abort startup with UNKNOWN_ELEMENT_IN_CONFIG. Set <skip_check_for_incorrect_settings>1</skip_check_for_incorrect_settings> (or pass --skip_check_for_incorrect_settings=1) to restore the previous behavior.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

🤖 Generated with Claude Code

Version info

  • Merged into: 26.8.1.1144 (included in 26.8 and later)

Previously, wrong or misspelled configuration entries in the server
config were silently ignored, making it hard to diagnose configuration
issues (e.g., `<max_thred_pool_size>` would be silently ignored).

Added `ServerSettings::checkUnknownSettings` that validates all
top-level config keys against known ServerSettings entries and a
comprehensive list of known complex config sections. Throws
`UNKNOWN_ELEMENT_IN_CONFIG` if an unrecognized key is found.

The check is called on both server startup and config reload, and
respects the existing `skip_check_for_incorrect_settings` escape hatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7629905]

Summary: ✅


AI Review

Summary

This PR adds ServerSettings::checkUnknownSettings on startup and SYSTEM RELOAD CONFIG, plus a large compatibility allowlist and an extensive integration suite. The remaining problems are still fail-open paths in the final implementation: some unknown top-level keys can still slip through instead of raising UNKNOWN_ELEMENT_IN_CONFIG, so the contract promised by the PR is not fully met yet.

Findings

⚠️ Majors

  • [src/Core/ServerSettings.cpp:3377-3378] [dismissed by author -- https://github.com/Throw on unknown configuration option in server config #100332#discussion_r3514203094] The empty-section GraphiteMergeTree carveout still accepts any childless empty top-level tag as "Graphite-like". A config such as <my_typo/> or <my_unknown></my_unknown> is therefore silently accepted instead of throwing, which leaves one of the simplest unknown-option shapes outside the new validator's contract.
  • [src/Core/ServerSettings.cpp:3282-3318] [dismissed by author -- https://github.com/Throw on unknown configuration option in server config #100332#discussion_r3501069165] graphite_rule_valid still exempts arbitrary top-level sections whose Graphite rule is structurally valid by name but semantically invalid for the real parser, e.g. <function>not_a_function</function> or a malformed <regexp>. Those sections still bypass checkUnknownSettings, so unknown keys remain silently accepted for these shapes even though appendGraphitePattern would reject them once referenced.
  • [src/Core/ServerSettings.cpp:2542-2565] [dismissed by author -- https://github.com/Throw on unknown configuration option in server config #100332#discussion_r3602977572] Top-level <include .../> directives are still unioned from the raw pre-merge fragments instead of replaying merge semantics. A later remove or replace can therefore leave stale imported names in referenced_top_level_keys or keep has_unresolvable_top_level_from_zk_include latched, so the validator may still skip or whitelist an actually unknown top-level key.
Final Verdict

Request changes.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.80% 78.80% +0.00%

Changed lines: Changed C/C++ lines covered: 611/691 (88.42%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Mar 22, 2026
Comment thread src/Core/ServerSettings.cpp Resolved
Comment thread src/Core/ServerSettings.cpp Resolved
alexey-milovidov and others added 2 commits March 28, 2026 17:45
…gration tests

Address review feedback and fix CI failures:

- Add `instrumentation_trace_log` to known system log sections (present in
  default `programs/server/config.xml`, caused Fast Test server startup failure)
- Add `allow_experimental_cluster_discovery` to known cluster sections
- Add `lemmatizers`, `synonyms_extensions`, `catboost_lib_path`,
  `path_to_regions_hierarchy_file`, `path_to_regions_names_files` to known
  dictionaries/functions sections
- Add `transaction_log` to known miscellaneous sections

Fix integration tests that use custom top-level config keys:
- `test_http_handlers_config`: uses arbitrary config key referenced via
  `config://` in HTTP handler static responses
- `test_database_hms`: uses non-standard `experimental_features` section

Both tests now set `skip_check_for_incorrect_settings` to bypass the check.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread src/Core/ServerSettings.cpp Resolved
alexey-milovidov and others added 2 commits March 29, 2026 00:49
…ndling

- Add command-line option names (`pid-file`, `config-file`, `log-file`,
  `errorlog-file`) to the known config sections allowlist. These keys are
  injected into the config by `argsToConfig` which processes all argv
  entries, including Poco options that were already handled via bindings.

- Dynamically extract top-level keys referenced via `config://` in
  `http_handlers` `response_content`/`response_expression` fields and
  whitelist them. This preserves backward compatibility for deployments
  using custom config-backed static HTTP responses via `StaticRequestHandler`.

- Remove the `skip_check_for_incorrect_settings` workaround from the
  `test_static_handler` integration test config, since the dynamic
  extraction now properly handles it.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread src/Core/ServerSettings.cpp Resolved
alexey-milovidov and others added 2 commits March 30, 2026 06:39
…ig allowlist

The `pid-file` Poco option has `.binding("pid")`, so Poco stores the
value under the key `pid` in the config — causing `UNKNOWN_ELEMENT_IN_CONFIG`
on server startup.

Also add hyphen-less variants (`pidfile`, `configfile`, `logfile`,
`errorlogfile`) since `argsToConfig` stores raw CLI key names without
normalization.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread src/Core/ServerSettings.cpp Resolved
alexey-milovidov and others added 4 commits March 30, 2026 11:08
Poco's `SystemConfiguration` injects a `system` top-level key into the
layered configuration. When `checkUnknownSettings` enumerates all
top-level keys via `config.keys("")`, it sees this Poco-internal key
and rejects it with `UNKNOWN_ELEMENT_IN_CONFIG`, preventing server
startup (as seen in the Fast test CI failure).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add a test that verifies the server rejects unknown top-level config
keys with `UNKNOWN_ELEMENT_IN_CONFIG`. This ensures future allowlist
edits don't silently reintroduce startup exceptions or allow invalid
keys through.

The existing `test_http_handlers_config/test_static_handler` test
already validates that custom top-level keys referenced via `config://`
pass validation without `skip_check_for_incorrect_settings`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread src/Core/ServerSettings.cpp Resolved
alexey-milovidov and others added 3 commits April 6, 2026 23:13
… allowlist, fix integration test

- Add `core_path` to `known_complex_sections` — this key is read by
  `BaseDaemon` for the core dump directory and is used in stress test
  configs. Missing it caused all stress tests and install tests to fail
  with `UNKNOWN_ELEMENT_IN_CONFIG`.

- Add `experimental_features` to `known_complex_sections` and remove
  the `skip_check_for_incorrect_settings` workaround from
  `test_database_hms/config.xml` (per review feedback).

- Fix `test_unknown_config_option` integration test: when the server
  fails to start, the error message goes to the error log file (via
  `--errorlog-file`), not to container stdout. Read the error log from
  the host-mounted logs directory so the assertion can find the
  `UNKNOWN_ELEMENT_IN_CONFIG` message.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread src/Core/ServerSettings.cpp Resolved
@alexey-milovidov

Copy link
Copy Markdown
Member Author

The failures of "Flaky check" in "functions_bad_arguments" will be fixed by #101994.

Comment thread src/Core/ServerSettings.cpp Resolved
alexey-milovidov and others added 3 commits April 8, 2026 01:37
- Add `daemon`, `umask`, `help`, `version` to the known config sections
  allowlist. These are injected by Poco `ServerApplication` and
  `argsToConfig` when the server is started with `--daemon --umask` etc.
  Without this, those startup flows throw `UNKNOWN_ELEMENT_IN_CONFIG`.

- Tighten prefix-based matching for dynamic config sections
  (`graphite_rollup`, `http_handlers`, `users`) to require an exact match
  or prefix followed by `_` separator. Previously, bare `starts_with`
  would silently accept typos like `graphite_rollupTypo`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This key is used in the AST fuzzer config (`fuzz-server-settings.xml`)
for shared catalog support. Without it, the server fails to start
with `UNKNOWN_ELEMENT_IN_CONFIG` during fuzzer CI runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

The MSan stress test failure (MemorySanitizer: use-of-uninitialized-value, STID 4179-5154 or 4148-3044) is a known pre-existing issue unrelated to this PR. Fix: #102158

@alexey-milovidov alexey-milovidov mentioned this pull request Aug 12, 2026
1 task done
alexey-milovidov added a commit that referenced this pull request Aug 12, 2026
Since #100332, a server refuses to start when the config contains an
unknown top-level key. The perf-comparison 'master_head' jobs start the
Reference server from the latest master binary with this PR checkout's
config, which sets `columns_cache_size` — a key that master does not
know yet — so all 12 shards failed at "Start" with
`UNKNOWN_ELEMENT_IN_CONFIG`. Keep the cache disabled in the
perf-comparison environment but set
`skip_check_for_incorrect_settings` so the older binary can start.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96844&sha=e66ac61cb546f235a1e2768e2a076f5fc7dc2f25&name_0=PR&name_1=Performance%20Comparison%20%28amd_release%2C%20master_head%2C%201%2F6%29

Co-Authored-By: Claude Fable 5 <[email protected]>
@groeneai

groeneai commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Closing the loop on the AST fuzzer (amd_msan) red I answered here on 2026-07-22 (STID 2270-3452, Invalid number of columns in chunk pushed to OutputPort from JoiningTransform::prepare). It stopped reproducing and #111401 was closed on review rather than merged, so the correction belongs on this thread: my comment above called it reproducible on current master, and that is no longer true.

One variant worth not conflating with this one: the same message text is still live from RemoteSource::prepare (through ISource.cpp:49) rather than JoiningTransform::prepare, on clusterAllReplicas(..., view(...)) plus a window function (STID 2270-3258, 132 rows over 80 pull requests in 30 days, 2 of them on master, most recent today). Different root cause, tracked in #114611.

zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Fix Fast test "Start ClickHouse Server" failure caused by stock config
containing top-level `<histogram_metric_log>` section, which was not in
the `known_complex_sections` allowlist.

Also allow `log` and `errorlog` top-level keys, mirroring the existing
`config` entry: Poco's `OptionProcessor` resolves `--log` and `--errorlog`
as prefix abbreviations of `--log-file` and `--errorlog-file`, and
`argsToConfig` stores the raw CLI key in the config layer.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100332&sha=ddee8e063769cfb202fcc861184fc0270108fdb3&name_0=PR&name_1=Fast%20test
PR: ClickHouse#100332

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The new `predicate_statistics_log` system log was added to master after this
branch diverged. It is included in the default test config, so the fast test
fails at startup with `UNKNOWN_ELEMENT_IN_CONFIG`.

CI report: ClickHouse#100332
Fast test failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100332&sha=31406922f03756e014ca8aaafecaa661d42d8959&name_0=PR&name_1=Fast%20test
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The reload cluster started with `static_handler_config_ref.xml`, which
already provides an `<http_handlers>` section with a single `<rule>`
that references `config://my_static_response_payload`. The test then
injected a second `<http_handlers>` section (from `reload_payload.xml`)
that referenced `config://my_reload_payload`.

`ConfigProcessor::mergeRecursive` matches sibling elements by name +
attributes, so the two `<rule>` elements (and the two `<defaults/>`
markers) collapsed into one. Whichever file was merged last (the
alphabetical order put `static_handler_config_ref.xml` after
`reload_payload.xml`) overwrote the other rule's `<url>` and
`<response_content>` text. The merged config kept
`<my_reload_payload>` as a top-level key but lost the
`config://my_reload_payload` reference, so `checkUnknownSettings`
rightly rejected the orphaned key with `UNKNOWN_ELEMENT_IN_CONFIG`.

Switch the reload cluster to a minimal placeholder
`reload_initial.xml` so there is no pre-existing `<http_handlers>` to
collide with the rules injected at runtime.

CI report: ClickHouse#100332

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
`clickhouse-private` test configs introduce additional top-level
sections used by SharedCatalog, distributed cache, and stateless
workers. Without them in the allowlist, the new validation throws
`UNKNOWN_ELEMENT_IN_CONFIG` at server startup in private CI:

- `shared_merge_tree`
- `distributed_cache_client`
- `distributed_cache_server`
- `distributed_query`
- `stateless_worker_client`
- `stateless_worker_server`
- `_functional_tests_helper_shared_catalog`

Confirmed by the "CH Inc sync" failure on
ClickHouse/clickhouse-private#53245 (sync
PR for ClickHouse#100332): every
SharedCatalog / distributed-cache / meta-in-keeper test job reports
"Failed to start ClickHouse replica 0" with no client connection
on `localhost:9000`.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…wlist

The private CI integration test job
`test_shared_catalog/test.py::test_server_uuid_from_replica_name`
fails to start the server because `checkUnknownSettings` rejects two
top-level keys consumed only by private builds:

- `server_uuid_from_replica_name` — read in `programs/server/Server.cpp`
  to derive the server UUID from `macros.replica` for SharedCatalog.
- `cloud` — used for `cloud.readiness` (`CloudReadinessHandler`) and
  `cloud.port` in `programs/server/Server.cpp`.

Both keys are absent from public ClickHouse, so they only appear in
the private allowlist. Without them every SharedCatalog-enabled
integration test job in the sync PR fails with
`UNKNOWN_ELEMENT_IN_CONFIG` at server startup.

Confirmed by the failing jobs in the sync PR
ClickHouse/clickhouse-private#53245 (sync of
ClickHouse#100332): all
`Integration tests (amd_*, db disk, ...)` and `Integration tests
(amd_tsan / amd_msan, ...)` shards fail at setup of
`test_server_uuid_from_replica_name` with the same exception.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…list

The previous commit (`Address review: drop blanket users_* prefix allowlist`)
made the unknown-config check reject any top-level `users_*` keys in the
main config. That broke `test_config_substitutions` because it placed the
include source file (`include_from_source.xml`/`yml`) under `main_configs=`,
which causes the integration test framework to copy it into `config.d/`.
Files in `config.d/` are auto-loaded as part of the main config, so the
file's top-level keys (`<users_1>`, `<users_2>`) leaked into the merged
main config and tripped `checkUnknownSettings`:

    Code: 137. DB::Exception: Unknown element 'users_1' found in config
    /etc/clickhouse-server/config.xml. (UNKNOWN_ELEMENT_IN_CONFIG)

These files are not real main configs - they are pure substitution sources
referenced by `<include_from>`. The fix is to use `extra_configs=` instead,
which copies them to `extra_conf.d/` (a directory ClickHouse does not
auto-load) and update the `<include_from>` paths accordingly.

CI report:
ClickHouse#100332

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…op-level config keys

Cloud runs were failing with `UNKNOWN_ELEMENT_IN_CONFIG` for `enable_http_stacktrace`,
which is a real top-level config option consulted by `HTTPHandler` (see
`src/Server/HTTPHandler.cpp`) and `enable_verbose_replicas_status` is consulted by
`ReplicasStatusHandler` (see `src/Server/ReplicasStatusHandler.cpp`). Both are
documented in the example `programs/server/config.xml`.

Reported by @yurifedoseev on PR ClickHouse#100332.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Cloud runs were failing with `UNKNOWN_ELEMENT_IN_CONFIG` for
`format_alter_operations_with_parentheses`, a legacy server config
setting whose default flipped to true in 25.2 (see ClickHouse#75302) and is no
longer consulted in the public codebase. Long-lived cloud configs may
still carry the key as leftover state, so add it to the obsolete-key
allowlist to keep upgrading installations starting cleanly.

Reported by @yurifedoseev on PR ClickHouse#100332.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
`StaticRequestHandler` accepts `config://` lookups with Poco's bracket-index
path syntax (e.g. `config://my_payload[1]` to select the second instance of
a repeated top-level key, or `config://my_payload[1].field`).

Previously the validator stripped the path at the first `.` but kept any
`[index]` suffix, so `referenced_keys` ended up holding `my_payload[1]`.
The corresponding `top_level_keys` are normalized by stripping `[index]`
before the membership check, so the lookup of `my_payload` (and of
`my_payload[1]` after its own normalization) missed the recorded reference
and produced a spurious `UNKNOWN_ELEMENT_IN_CONFIG`.

Normalize the reference the same way by truncating at the first `.` or `[`
when recording it. Added an integration test that exercises a repeated
top-level key referenced via `config://my_indexed_payload[1]`.

Reported by @yurifedoseev on PR ClickHouse#100332.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
`test_config_substitutions` puts `<include_from>` in a `users.d/` fragment
and keeps the substitution source under `config.d/`. The earlier fix only
read `include_from` from the main config, so node4 still tripped
`UNKNOWN_ELEMENT_IN_CONFIG` on `users_1` / `users_2` / `mqs` after the
substitution source leaked into the merged main config.

Now scan all standard config files (main config, `config.d/`, users config,
`users.d/`) for:
1. `incl="X"` attributes — `X` is a top-level key in the substitution source.
2. `<include_from>` elements — parse the referenced source and exempt its
   top-level keys (preserves the previous broader exemption).

The check is best-effort (parse failures are tolerated) so a malformed
fragment elsewhere in the directory does not cause a false negative.

See https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100332&sha=686d83c3f55aa655de5ea287fce40617dfead60e&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20targeted%29

PR: ClickHouse#100332

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
When `<include_from>` uses a `from_env` or `from_zk` attribute, the raw
XML has an empty `innerText()`, so the previous scan did not pick up
the resolved path. Top-level keys from the include source could then
leak into the merged main config as unrecognized keys and trip
`UNKNOWN_ELEMENT_IN_CONFIG`.

Two complementary fixes:
* When scanning raw XML, resolve `from_env="VAR"` on `<include_from>`
  via `std::getenv` and use it as the source path.
* Additionally, read the already-substituted `include_from` value from
  the merged `config` parameter (it covers `from_zk` and any other
  substitution form `ConfigProcessor` resolved before us).

Addresses review feedback on PR ClickHouse#100332.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The private/enterprise `<jwt_authenticators>` config section (parsed in
`ExternalAuthenticators` and referenced by static users via
`<jwt_authentication>`) was not in the `checkUnknownSettings` allowlist, so
the server threw `UNKNOWN_ELEMENT_IN_CONFIG` on startup and failed to start.

This broke the private integration tests `test_jwt_static_users` and
`test_jwt_static_users_with_jwks`, surfacing as the `CH Inc sync` failure.

Add `jwt_authenticators` alongside the other authentication sections (`jwt`,
`ldap_servers`, `kerberos`, `http_authentication_servers`).

Found via the `CH Inc sync` report for PR ClickHouse#100332:
ClickHouse/clickhouse-private#53245

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…onfig.xml`

This PR removed `tests/integration/test_database_hms/config.xml` (a dead
`<experimental_features>` section that no C++ code reads) and dropped the
`main_configs` reference from `test.py`. Meanwhile,
`test_ttransport_exception_reproduction.py` was added on master with the
same `main_configs=["config.xml"]` reference, so after merging master the
test failed with `FileNotFoundError` in all integration shards.

Apply the same change as in `test.py`: the two experimental settings are
user/profile settings already defined in the test's `users.xml`, which the
test loads via `user_configs`.

CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100332&sha=b82c9682bfc4a7b0fdb9e694914e4c510fc8000d&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%203%2F6%29
PR: ClickHouse#100332

Co-Authored-By: Claude Fable 5 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
On `SYSTEM RELOAD CONFIG`, `Settings::checkNoSettingNamesAtTopLevel` validates the
file-only `loaded_config` (so that a failed reload does not leave the layered
`config()` partially mutated), but that file-only config does not carry
command-line options. As a result `--skip_check_for_incorrect_settings=1` no
longer suppressed this pre-existing top-level user-setting check on reload, even
though it still does at startup. Gate the call on the escape hatch resolved from
the layered `config()`, mirroring what `checkUnknownSettings` already does.

Addresses the review finding at programs/server/Server.cpp:2335
(ClickHouse#100332 (comment)).
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
1. Arbitrary-named `GraphiteMergeTree` rollup sections. The rollup config section
   name is taken from the table definition (`GraphiteMergeTree('<section>')`), so
   it can be any name, not only `graphite_rollup*`. Such a section was valid
   before this check existed and was wrongly rejected at startup with
   `UNKNOWN_ELEMENT_IN_CONFIG`. Recognize it by its structure (a `<pattern>` or
   `<default>` carrying `<regexp>`/`<function>`/`<retention>`) so it is accepted
   while unstructured typos are still rejected.

2. External `<include_from>` substitution sources. `ConfigProcessor` reads an
   external `<include_from>` source only as a lookup table for `incl` references;
   it does not add the source document's top-level tags to the merged config.
   Exempting those tags unconditionally let a genuinely unknown top-level key pass
   merely because the lookup table happened to define a tag of the same name.
   Only exempt a source's top-level tags when the source file is itself merged
   into the server config (it lives under `config.d`/`conf.d`); canonicalize paths
   so symlinks do not defeat the membership test.

Addresses the review findings at src/Core/ServerSettings.cpp:2132
(ClickHouse#100332 (comment))
and src/Core/ServerSettings.cpp:2336
(ClickHouse#100332 (comment)).
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
clickhouse-benchmark uses the default handshake_timeout_ms=10000 (10s) and
connect_timeout=10s. On slow lanes (amd_tsan, s3 storage, parallel) the TLS
handshake to the secure port can take longer than 10s under load, so the client
aborts with Code: 209 DB::NetException Timeout exceeded (SOCKET_TIMEOUT) before
certificate verification runs. That breaks both checks: the first invocation
loses its expected "certificate verify failed" line, and the SOCKET_TIMEOUT text
trips grep Exception in the second invocation. "Server died" is the harness
verdict from the same slow-response window, not a crash.

Add --connect_timeout 60 --handshake_timeout_ms 60000 to the benchmark
invocations so the handshake has a generous budget on slow lanes. The test still
verifies the same behavior: --secure without --accept-invalid-certificate still
prints "certificate verify failed", and --secure --accept-invalid-certificate
still succeeds with no exception.

Same approach as 01600_benchmark_query (ClickHouse#108570) and 03636_benchmark_error_messages
(ClickHouse#103298, ClickHouse#103668).

Reported on ClickHouse#100332 by alexey-milovidov.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
filimonov added a commit to Altinity/ClickHouse that referenced this pull request Nov 6, 2026
…_disk_remote_url_allow_hosts

Both instances start from clickhouse/clickhouse-server:26.8.26.12 with the fork's config.xml,
and since ClickHouse#100332 an upstream server refuses it:
`Unknown elements 'cas_log', 'cas_gc_log' found in config /etc/clickhouse-server/config.xml
(UNKNOWN_ELEMENT_IN_CONFIG)`. Set skip_check_for_incorrect_settings for these two instances only.

CI: https://altinity-build-artifacts.s3.amazonaws.com/PRs/2805/8c26e8792eb4d675d6cfa59b06f8e31b38471008/integration_tests_amd_asan_ubsan_targeted/logs.tar.gz
PR: #2805

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
filimonov added a commit to Altinity/ClickHouse that referenced this pull request Nov 13, 2026
Both instances start from `clickhouse/clickhouse-server:26.8.26.12` with the fork's `config.xml`,
and since ClickHouse#100332 an upstream server refuses it:
`Unknown elements 'cas_log', 'cas_gc_log' found in config /etc/clickhouse-server/config.xml
(UNKNOWN_ELEMENT_IN_CONFIG)`. Set `skip_check_for_incorrect_settings` for these two instances only.
The test is `test_custom_s3_disk_remote_url_allow_hosts`.

CI: https://altinity-build-artifacts.s3.amazonaws.com/PRs/2805/8c26e8792eb4d675d6cfa59b06f8e31b38471008/integration_tests_amd_asan_ubsan_targeted/logs.tar.gz
PR: #2805

Signed-off-by: Mikhail Filimonov <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.

6 participants