Skip to content

Do not restart ClickHouse on configuration.zookeeper changes - #2074

Open
identw wants to merge 1 commit into
Altinity:0.27.4from
identw:fix/zookeeper-no-restart-on-endpoint-change
Open

Do not restart ClickHouse on configuration.zookeeper changes#2074
identw wants to merge 1 commit into
Altinity:0.27.4from
identw:fix/zookeeper-no-restart-on-endpoint-change

Conversation

@identw

@identw identw commented Aug 27, 2026

Copy link
Copy Markdown

Honor configurationRestartPolicy for zookeeper/* (default no) so endpoint updates apply without hostForceRestart, while other reboot-required changes still restart.

Thanks for taking the time to contribute to clickhouse-operator!

Please, read carefully instructions on how to make a Pull Request.

This will help a lot for maintainers to adopt your Pull Request.

Important items to consider before making a Pull Request

Please check items PR complies to:

  • All commits in the PR are squashed. More info
  • The PR is made into dedicated next-release branch, not into master branch1. More info
  • The PR is signed. More info

--

1 If you feel your PR does not affect any Go-code or any testable functionality (for example, PR contains docs only or supplementary materials), PR can be made into master branch, but it has to be confirmed by project's maintainer.

Summary

isZookeeperChangeRequiresReboot ignored configurationRestartPolicy and always restarted ClickHouse when ZooKeeper endpoints changed, even though the default policy is zookeeper/*: "no". ClickHouse reloads <zookeeper> from config without a process restart.

Test plan

  • go test ./pkg/model/ -run TestIsConfigurationChangeRequiresReboot -count=1

Honor configurationRestartPolicy for zookeeper/* (default no) so endpoint
updates apply without hostForceRestart, while other reboot-required changes
still restart.

Signed-off-by: Dmitry Sergeev <identw@gmail.com>
@sunsingerus sunsingerus added the planned for review This feature is planned for review label Aug 28, 2026
@alex-zaitsev

Copy link
Copy Markdown
Member

ClickHouse can apply ZooKeeper config changes without a server restart starting in the 20.10 line.

That landed in three steps:

Version What became reloadable
20.10 Main <zookeeper> section — dynamic reload (#14678). On this first cut, ReplicatedMergeTree / DDL worker typically picked up the new client after the current ZooKeeper session expired.
20.11 More reliable runtime update of the main ZooKeeper config (#16630).
20.12 <auxiliary_zookeepers> can also be changed in config.xml and reloaded without a restart (#16627).

In practice: any current supported release (21.8 LTS and later) does not need a ClickHouse restart for ZooKeeper / Keeper endpoint or settings changes. The server reloads config.xml / config.d/ itself; SYSTEM RELOAD CONFIG forces it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

planned for review This feature is planned for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants