Skip to content

Add projection PK memory/disk metrics to system.parts for accurate parent part total calculation#111616

Open
linjiayu1025-collab wants to merge 1 commit into
ClickHouse:masterfrom
linjiayu1025-collab:fix-projection-primary-key-memory-accounting
Open

Add projection PK memory/disk metrics to system.parts for accurate parent part total calculation#111616
linjiayu1025-collab wants to merge 1 commit into
ClickHouse:masterfrom
linjiayu1025-collab:fix-projection-primary-key-memory-accounting

Conversation

@linjiayu1025-collab

Copy link
Copy Markdown
Contributor

Resolves: #109803

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

  • Projection primary keys were accounted only through projection-specific metrics and system.projection_parts, while the aggregate primary key metrics and parent system.parts fields did not include them.
  • This change makes TotalPrimaryKeyBytesInMemory, TotalPrimaryKeyBytesInMemoryAllocated, system.parts.primary_key_size, system.parts.primary_key_bytes_in_memory, system.parts.primary_key_bytes_in_memory_allocated, and the corresponding system.parts_columns memory fields include primary keys from projections stored inside the parent part. Projection-specific metrics and system.projection_parts remain available for inspecting projection-only usage.
  • system.tables does not currently expose primary-key-memory fields, so there is no matching system.tables column to update. Existing system.tables row, part, and byte counters keep their current semantics.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

…ryKeyBytesInMemory, TotalPrimaryKeyBytesInMemoryAllocated, and related system.parts fields so parent part totals reflect primary keys stored in projections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant