branch-4.0: [fix](filecache) avoid recursive empty dir cleanup#63728
Open
liaoxin01 wants to merge 1 commit into
Open
branch-4.0: [fix](filecache) avoid recursive empty dir cleanup#63728liaoxin01 wants to merge 1 commit into
liaoxin01 wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates local file cache cleanup to avoid recursively deleting cache directories, using an empty-directory-only removal path instead.
Changes:
- Adds
LocalFileSystem::delete_empty_directory()implemented withrmdir. - Uses empty-directory deletion during file cache block removal.
- Adds unit coverage for deleting empty vs non-empty local directories.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
be/src/io/fs/local_file_system.h |
Declares the empty-directory deletion API. |
be/src/io/fs/local_file_system.cpp |
Implements non-recursive empty directory removal. |
be/src/io/cache/fs_file_cache_storage.cpp |
Switches file cache cleanup to delete directories only when empty. |
be/test/io/fs/local_file_system_test.cpp |
Adds tests for empty and non-empty directory deletion behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
run buildall |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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.
Pick #63344