dotCMS / dotCMS/core

Delete empty assets directories

Open
#32,811 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Maintenance Type : Defect
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.