Delete empty assets directories
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
DotCMS accrues empty directories like assets/a/7/a7fea5fe-bed3-478b-890e-d56984d97e97 - presumably for deleted FileAssets but I'm not sure of this.
The number of empty directories runs often runs into the millions. These empty dirs add hours to the time required to clone filesystem data. Cloud Engineering manually deletes empty directories before cloning filesystems which itself is a slow process.
The Clean-bin-and-file-assets Tool does not appear to remove these directories.
Steps to Reproduce
for folder in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do find assets/$folder -maxdepth 2 -type d -empty -ctime +0; done | wc -l
Acceptance Criteria
prune empty assets dirs
dotCMS Version
all
Proposed Objective
Application Performance
Proposed Priority
Priority 3 - Average
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Clean-bin-and-file-assets Tool and checking how it handles filesystem cleanup. Use the provided find command against assets directories to reproduce the problem, then verify that the implementation prunes empty asset directories without affecting non-empty directories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100