Skip to content

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
cherrypick/26.2/96051
Feb 26, 2026
Merged

Cherry pick #96051 to 26.2: Enforce Keeper component name in code#98093
robot-clickhouse-ci-1 merged 19 commits intobackport/26.2/96051from
cherrypick/26.2/96051

Conversation

@robot-clickhouse-ci-1
Copy link
Copy Markdown
Contributor

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-pick locally.
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:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

antonio2368 and others added 19 commits February 3, 2026 16:58
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]>
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Feb 26, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 merged commit dd4d9fd into backport/26.2/96051 Feb 26, 2026
157 of 158 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 deleted the cherrypick/26.2/96051 branch February 26, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants