Repository navigation
Cherry pick #133464 to 26.10: Remove the background cleanup of unused directories in store/ - #133547
Merged
robot-ch-test-poll3 merged 4 commits intoNov 22, 2026
Merged
Conversation
`DatabaseCatalogCleanupStoreDirectoryTask` (added in #38265) walked `store/` on every disk, revoked all access rights from the directories it considered unused (`chmod 0`), and removed them recursively after `database_catalog_unused_dir_rm_timeout_sec` (30 days by default). Its notion of "unused" was "there is no UUID mapping for this directory", which is not a reliable sign of garbage: - With `async_load_databases` the task can run while a table is still being attached, so it hides the data directory of a live, attached table, and every query to the table fails with `Permission denied` (#133462). - After a power loss that loses a `.sql` metadata file, the task hides and then deletes data that could be recovered with `ATTACH TABLE ... UUID` (#111837). Leaving garbage in `store/` is better than the complex and error-prone logic of removing it, so the task is removed, as proposed in #133462 (comment) The server settings `database_catalog_unused_dir_hide_timeout_sec`, `database_catalog_unused_dir_rm_timeout_sec`, and `database_catalog_unused_dir_cleanup_period_sec` are kept as obsolete settings without effect, because the server refuses to start with unknown keys in the configuration, and existing configurations (including the workaround from the issue) contain them. The "locking" of UUIDs in `DatabaseCatalog` (`addUUIDMapping`, `TemporaryLockForUUIDDirectory`) stays: it also protects from two tables or databases using the same UUID and so the same directory. The test `test_store_cleanup` is removed together with the task. The test `01601_detach_permanently` no longer has to tolerate `STD_EXCEPTION`, which was caused by the task revoking access rights from a table directory. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Remove the background cleanup of unused directories in `store/`
Conflicts: - `tests/casa_del_dolor/properties.py`: removed the three `database_catalog_unused_dir_*` entries in the 26.10 form of the file; `database_catalog_shutdown_table_concurrency` is not listed there on 26.10, so it is not added. - `tests/integration/test_store_cleanup/test.py`: modified on 26.10, deleted by the backported change; kept deleted. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #133464
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job