liaoxin01 opened a new pull request, #63344: URL: https://github.com/apache/doris/pull/63344
### What problem does this PR solve? Fixes file cache empty directory leakage for v3 cache layout. In v3 layout, cache files live under `<hash_prefix>/<hash>_0/`. `FSFileCacheStorage::remove()` deletes the v3 cache file first, then switches the local directory variable to the legacy v2 path for compatibility cleanup. The final empty-directory cleanup therefore checks the v2 directory and can leave the actual v3 `<hash>_0` directory behind. This patch keeps v2 and v3 directory paths separately, preserves the existing v2 compatibility cleanup, and additionally removes the v3 key directory when it is empty. It also tries to remove the empty prefix directory using non-recursive `std::filesystem::remove()`. ### Check List - [x] Added unit test - [ ] Regression test ### Test - `git diff --check` - Tried `DORIS_TOOLCHAIN=gcc DORIS_GCC_HOME=/usr ./run-be-ut.sh --run --filter=FSFileCacheLeakCleanerTest.* -j 8`, but the local worktree lacks `thirdparty/installed/bin/protoc`, so BE UT configuration stops while building gensrc before running tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
