Skip to content

Fix lifetime of storage metadata and snapshot caching at query scope#92118

Merged
azat merged 6 commits into
ClickHouse:masterfrom
amosbird:fix-90770
Dec 18, 2025
Merged

Fix lifetime of storage metadata and snapshot caching at query scope#92118
azat merged 6 commits into
ClickHouse:masterfrom
amosbird:fix-90770

Conversation

@amosbird

Copy link
Copy Markdown
Collaborator

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):

Fix a potential memory leak when enable_shared_storage_snapshot_in_query = 1 by properly scoping storage metadata and snapshot caches to query execution. This addresses the issue discovered in #90770 and re-enables enable_shared_storage_snapshot_in_query by default.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh

clickhouse-gh Bot commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5ee47d9]

Summary:

job_name test_name status info comment
Bugfix validation (integration tests) failure
test_metdata_cache_memory_leak/test.py::test_metadata_cache_memleak FAIL cidb
Stateless tests (amd_debug, AsyncInsert, s3 storage, parallel) failure
03735_excessive_buffer_flush FAIL cidb, issue
Stateless tests (amd_tsan, parallel) failure
03702_alter_column_update_and_delete_with_secondary_index_rebuild FAIL cidb
Integration tests (amd_tsan, 6/6) failure
test_keeper_max_append_byte_size/test.py::test_keeper_max_append_byte_size FAIL cidb
BuzzHouse (amd_debug) failure
Logical error: 'Inconsistent AST formatting in Function_arrayElement: the query: (STID: 1941-1bfa) FAIL cidb, issue
BuzzHouse (amd_ubsan) failure
Logical error: Block structure mismatch in A stream: different columns: (STID: 0993-17c0) FAIL cidb

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Dec 14, 2025
@azat azat self-assigned this Dec 14, 2025
Comment thread tests/integration/test_metdata_cache_memory_leak/test.py Outdated
Comment thread src/Interpreters/executeQuery.cpp
@azat

azat commented Dec 16, 2025

Copy link
Copy Markdown
Member

CH Inc syncWaiting for status to be reported — tests started

Fixed the private sync, let's wait

Comment thread tests/integration/test_metdata_cache_memory_leak/test.py Outdated
@azat azat enabled auto-merge December 18, 2025 08:08
@azat azat added this pull request to the merge queue Dec 18, 2025
Merged via the queue into ClickHouse:master with commit deaab5a Dec 18, 2025
124 of 131 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Dec 18, 2025
azat added a commit to azat/ClickHouse that referenced this pull request Jan 29, 2026
The storage should not outlive the execution after ClickHouse#92118, since it is
hold in QueryPipeline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default 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.

4 participants