Skip to content

enable_shared_storage_snapshot_in_query by default#82634

Merged
alexey-milovidov merged 14 commits intomasterfrom
enable_shared_storage_snapshot_in_query
Nov 16, 2025
Merged

enable_shared_storage_snapshot_in_query by default#82634
alexey-milovidov merged 14 commits intomasterfrom
enable_shared_storage_snapshot_in_query

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Jun 26, 2025

Changelog category (leave one):

  • Improvement

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

Enable enable_shared_storage_snapshot_in_query by default for better consistency guarantees. There should be no downsides.

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jun 26, 2025

Workflow [PR], commit [10ab690]

Summary:

job_name test_name status info comment
Stateless tests (arm_asan, targeted) error
Stateless tests (amd_tsan, s3 storage, parallel) failure
03652_memory_usage_headers FAIL cidb
BuzzHouse (amd_debug) failure
Buzzing result failure cidb
BuzzHouse (amd_msan) failure
Buzzing result failure cidb
BuzzHouse (amd_ubsan) failure
Buzzing result failure cidb

@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Jun 26, 2025
@amosbird
Copy link
Copy Markdown
Collaborator

Fast tests are failing in interesting ways; I’ll look into it.

@azat
Copy link
Copy Markdown
Member

azat commented Jun 26, 2025

enable_shared_storage_snapshot_in_query by default for better consistency guarantees. There should be no downsides.

There is one problem for long running queries

If you have a query that removes almost all parts during pruning, then all parts that are not used for SELECT can be removed at any time (even if query takes hours), but with this setting enabled this will not be possible, and I've already experienced issues with this here - #37913

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jul 29, 2025

Dear @azat, this PR hasn't been updated for a while. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

@azat, how big is the problem in practice, I mean, does it justify not having this by default?

@alexey-milovidov
Copy link
Copy Markdown
Member Author

@amosbird, something is related to the mergeTreeProjection table function.

@azat
Copy link
Copy Markdown
Member

azat commented Aug 3, 2025

@azat, how big is the problem in practice, I mean, does it justify not having this by default?

It is big if you have

  • long running queries (that blocks parts from removing)
  • real-time ingestion
  • parts located on HDD

This may lead to a situation when HDDs will not be able to remove parts fast enough

But, maybe it is a sensible default...

@amosbird
Copy link
Copy Markdown
Collaborator

amosbird commented Aug 3, 2025

@amosbird, something is related to the mergeTreeProjection table function.

It's already resolved.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

@amosbird, it's unclear to me why tests for FileLog have failed, maybe you will have a chance to find the reason quicker?

@amosbird
Copy link
Copy Markdown
Collaborator

Sure. I’ll investigate it later this week.

@amosbird
Copy link
Copy Markdown
Collaborator

@alexey-milovidov The issue happens because FileLog doesn’t properly clean up the context between view invocations, unlike StorageKafka and StorageObjectQueue, where this is already handled correctly. I’ve fixed it in #88810 together with similar adjustments for other storage types. Also randomized this setting in tests to potentially catch more related issues.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

@amosbird, we have a similar problem with MaterializedPostgreSQL.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

@amosbird, for some reason, tests for MaterializedPostgreSQL are still failing.

@azat
Copy link
Copy Markdown
Member

azat commented Oct 31, 2025

There is also one more issue, that will be addressed here - #89283

@amosbird
Copy link
Copy Markdown
Collaborator

amosbird commented Nov 4, 2025

for some reason, tests for MaterializedPostgreSQL are still failing.

Lemme check...

@amosbird
Copy link
Copy Markdown
Collaborator

It should be fixed by #89795

@alexey-milovidov alexey-milovidov merged commit 2d95370 into master Nov 16, 2025
125 of 132 checks passed
@alexey-milovidov alexey-milovidov deleted the enable_shared_storage_snapshot_in_query branch November 16, 2025 16:17
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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