-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Revert "Cleanup previous snapshot files during materialized view refresh" #26051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Cleanup previous snapshot files during materialized view refresh" #26051
Conversation
…esh" This reverts commit 4813578.
|
@raunaqmorarka thanks, please run CI with secrets. |
Why aren't the changes in TestIcebergFileOperations part of the revert commit ? |
|
/test-with-secrets sha=4ef626791288aa8e0e5171f314caa3222342434e |
|
The CI workflow run with tests that require additional secrets has been started: https://github.com/trinodb/trino/actions/runs/15830221921 |
I also wondered the same when I changed this PR to draft but then I realized the test had been removed through 5210b0e#diff-33f2d439b6cac05c1a8528131271f2ff815478c6344b174870c8688370056de1 |
|
Thanks! @mayankvadariya After upgrading Trino to version 476, we received a user report that the refresh query for an Iceberg materialized view no longer works and gets stuck at 100%. Following the content of this PR, we will revert the regression-causing commit to address the issue! |
|
@raunaqmorarka @mayankvadariya @ebyhr Can we revisit this now - add it back, since the #26230 probably fixes the thread safety that in the original 4813578 see #26310 |
|
@chenjian2664 There were two reasons for reverting this
|

Description
This reverts commit 4813578.
The current change may disrupt an existing running query that is accessing a materialized view snapshot, which could be cleaned up by a 'REFRESH MATERIALIZED VIEW' command. This change needs to be reapplied, with the retention period for past snapshots controlled through a configuration setting.
The current change was also observed to cause REFRESH MV commands to stay stuck in FINISHING state for a long time due to slow cleanup of old snapshots
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: