Cherry pick #96051 to 26.2: Enforce Keeper component name in code#98093
Merged
robot-clickhouse-ci-1 merged 19 commits intobackport/26.2/96051from Feb 26, 2026
Merged
Cherry pick #96051 to 26.2: Enforce Keeper component name in code#98093robot-clickhouse-ci-1 merged 19 commits intobackport/26.2/96051from
robot-clickhouse-ci-1 merged 19 commits intobackport/26.2/96051from
Conversation
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 <[email protected]>
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 <[email protected]>
Include `ZooKeeperCommon.h` in files that need access to `Coordination::setCurrentComponent` for keeper component tracking. Co-Authored-By: Claude Opus 4.6 <[email protected]>
`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 <[email protected]>
Enforce Keeper component name in code
dd4d9fd
into
backport/26.2/96051
157 of 158 checks passed
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.
Original pull-request #96051
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job