ClickHouse / ClickHouse/ClickHouse

Configuration in YAML is not recognized if the top-level mapping is `clickhouse`.

Open
#84,200 0 comments 0 reactions 0 assignees View on GitHub
comp-config external potential bug
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

### Company or project name

_No response_

### Describe what's wrong

If ClickHouse has been configured with a **single** YAML configuration file, `--config-path=/ClickHouse/configuration.YAML`, without any other configuration files (such as `config.d/*`/`users.d/*`/`config.xml`/`users.xml`/`docker_related_config.xml`), and the top-level mapping is `clickhouse`, then ClickHouse does not recognize configuration items in it.

### Does it reproduce on the most recent release?

Yes

### How to reproduce

- ClickHouse 25.5.8.13
- Have a `.YAML` configuration file with the `clickhouse` top-level mapping:
```YAML
clickhouse:
(server setting): …
(server setting): …

```
- Specify it **as the only configuration file** (no merging happening) for the ClickHouse server, with the `--config-file=` argument.

### Expected behavior

The configured items should be respected.

### Error message and/or stacktrace

_No response_

### Additional context

[The ClickHouse documentation](https://clickhouse.com/docs/operations/configuration-files) says: “_In YAML configuration files, `clickhouse:` is optional, if absent the parser inserts it automatically._”

**Unlike that,** the current ClickHouse only respects the flattened form without the top-level `clickhouse` mapping, like the example:

https://github.com/ClickHouse/ClickHouse/blob/8ffceee30db47bbe5ca67d5f877023ae373bcfe1/programs/server/config.yaml.example#L1-L23

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.