Enforce Keeper component name in code#96051
Merged
antonio2368 merged 18 commits intomasterfrom Feb 26, 2026
Merged
Conversation
Contributor
|
Workflow [PR], commit [faa4053] Summary: ❌
|
1 task
afc1925 to
2c32d52
Compare
2c32d52 to
18453e8
Compare
fa7f728 to
4163639
Compare
Make ZooKeeper component tracking opt-in via the new `enforce_keeper_component_tracking` server setting. When enabled, every ZooKeeper request must have a component name set via `Coordination::setCurrentComponent`, otherwise a `LOGICAL_ERROR` exception is thrown. When disabled, requests without a component name are silently allowed. The setting is wired through `ZooKeeperArgs` and propagated in `Context` for both main and auxiliary ZooKeeper connections, including on config reload. Enabled by default in CI stateless tests and integration tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port public-file changes from ClickHouse/clickhouse-private#48520 that add Keeper component tracking to additional code paths across databases, disks, interpreters, storages, backups, and system tables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include `ZooKeeperCommon.h` in files that need access to `Coordination::setCurrentComponent` for keeper component tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`ZooKeeperArgs::operator==` is defaulted and compares all fields, including `enforce_component_tracking` and `send_receive_os_threads_nice_value` which are set out-of-band from server settings rather than from the ZooKeeper XML config. When `ZooKeeper::configChanged` constructs a fresh `ZooKeeperArgs` from config, these fields stay at their defaults, causing a permanent mismatch and forcing an unnecessary ZooKeeper reconnection on every `SYSTEM RELOAD CONFIG`. Copy these out-of-band fields from the existing args before comparing. Also add a `Coordination::setCurrentComponent` call in `MutatePlainMergeTreeTask::cancel`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mstetsyuk
approved these changes
Feb 26, 2026
robot-clickhouse-ci-1
added a commit
that referenced
this pull request
Feb 26, 2026
Cherry pick #96051 to 26.2: Enforce Keeper component name in code
robot-clickhouse
added a commit
that referenced
this pull request
Feb 26, 2026
clickhouse-gh bot
added a commit
that referenced
this pull request
Feb 26, 2026
Backport #96051 to 26.2: Enforce Keeper component name in code
25 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Enforce definition of Keeper component name in code so we have correct info in
aggregated_zookeeper_log.Documentation entry for user-facing changes