Skip to content

Set yet another current Keeper component - #113295

Merged
rienath merged 2 commits into
masterfrom
fix-codec-block-counts-keeper-component
Aug 5, 2026
Merged

rienath merged 2 commits into
masterfrom
fix-codec-block-counts-keeper-component

Conversation

@alesapin

@alesapin alesapin commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Version info

  • Merged into: 26.8.1.804 (included in 26.8 and later)

…rate

Reading part data files from the codec block counts source may issue
Keeper requests, which require the current component to be set for the
scope via `Coordination::setCurrentComponent`. Without it the query
failed with a logical error: "Current component is empty, please set it
for your scope using Coordination::setCurrentComponent".

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [084e931]

Summary: ✅


AI Review

Summary

This PR adds a missing Coordination::setCurrentComponent guard around MergeTreeCodecBlockCountsSource::generate, which is the correct executor-thread scope for Keeper-backed reads in this path. I did not find a correctness issue in the added guard itself, but the change still lacks focused proof for the enforce_keeper_component_tracking scenario it is meant to fix, and the PR metadata currently describes a runtime bug fix as a CI-only change.

PR Metadata
  • Changelog category is not aligned with the actual change. This is a runtime fix for a documented server setting, not a CI harness change, so CI Fix or Improvement is misleading. Use Bug Fix.
  • Changelog entry is required for Bug Fix. Suggested replacement: Fixes a LOGICAL_ERROR (Current component is empty) when querying mergeTreeCodecBlockCounts with enforce_keeper_component_tracking enabled and the table's part files use Keeper-backed metadata.
Tests
  • ⚠️ There is no focused regression that exercises mergeTreeCodecBlockCounts with enforce_keeper_component_tracking=1. The existing mergeTreeCodecBlockCounts stateless tests cover ordinary MergeTree behavior, but they do not pin the Keeper-backed read path this guard is protecting. A minimal zookeeper or integration repro for that storage mode would close the main proof gap.
Final Verdict

Needs changes before merge: add a focused regression for the enforce_keeper_component_tracking path, and retag the PR as a runtime Bug Fix with a user-facing changelog entry.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 1/1 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 4, 2026
@rienath rienath self-assigned this Aug 4, 2026
Chunk generate() override
{
/// Reading part files may issue Keeper requests, which require a component to be set for the scope.
auto component_guard = Coordination::setCurrentComponent("MergeTreeCodecBlockCountsSource::generate");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the right executor-thread scope for the component guard, but the fix still needs a focused regression. None of the existing mergeTreeCodecBlockCounts tests exercise enforce_keeper_component_tracking=1, and the missing-guard fixes in this area have usually needed their own zookeeper/integration repro to stay pinned down. A minimal test that queries mergeTreeCodecBlockCounts on the Keeper-backed part-storage mode that triggers this read would make the change much safer.

Chunk generate() override
{
/// Reading part files may issue Keeper requests, which require a component to be set for the scope.
auto component_guard = Coordination::setCurrentComponent("MergeTreeCodecBlockCountsSource::generate");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR template currently tags this as CI Fix or Improvement, but the code change is a runtime guard for a documented server setting, not a CI harness change. Please retag it as Bug Fix and add a user-facing entry, for example: Fixes a LOGICAL_ERROR (Current component is empty) when querying mergeTreeCodecBlockCounts with enforce_keeper_component_tracking enabled and the table's part files use Keeper-backed metadata.

@rienath rienath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@rienath
rienath added this pull request to the merge queue Aug 5, 2026
Merged via the queue into master with commit e230874 Aug 5, 2026
351 of 353 checks passed
@rienath
rienath deleted the fix-codec-block-counts-keeper-component branch August 5, 2026 08:40
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants