Repository navigation
fix(cache): keep filesystem root intact across flush() - #14033
cursor[bot] wants to merge 4 commits into
Conversation
Empty directories no longer trip deleteDirectory()'s glob check, and flush() clears entries without removing the configured cache root so ping() and repeated flush() calls stay valid. Fixes #14007 Co-authored-by: chiragaggarwal5k <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
🟢 Tier S · Ready to merge
Updates filesystem cache flushing to preserve the configured root directory, accept empty directories, and report entry deletion failures. Adds regression coverage for root retention, idempotent flushing, and deletion failures, with platform and root-user skips for the permission-based test. Latest changes: The newest commit skips the permission-based deletion-failure test when running as root, where directory write permissions do not prevent unlinking.
Note @cursor[bot] does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve. 📂 Walkthrough · 2
✅ Fixed since the last review · 1
Reviewed the commits since |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
When preserving the cache root, still return false if unlink or nested directory removal fails so flush() does not report success while entries remain. Co-authored-by: chiragaggarwal5k <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
CI unit jobs run as root, which can unlink files in a non-writable directory, so the permission-based regression cannot be simulated there. Co-authored-by: chiragaggarwal5k <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Co-authored-by: chiragaggarwal5k <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
What does this PR do?
Fixes
Filesystemcacheflush()so empty directories are treated as success (glob()returning[]is not an error), and so flush clears cache entries without deleting the configured root directory. That keepsping()true and makes repeatedflush()calls idempotent.Test Plan
FilesystemTest::testFlushKeepsRootAndIsIdempotent()covering empty flush, populated flush, root retention, ping, and a second flush.Base::testFlush()continues to assert entries are cleared.Related PRs and Issues
flush()on a cache backed by theFilesystemadapter leads runtime failures #14007Checklist