amoro icon indicating copy to clipboard operation
amoro copied to clipboard

[Improvement]: Improve the stability of deleting expired files

Open xxubai opened this issue 6 months ago • 1 comments

Search before asking

  • [x] I have searched in the issues and found no similar issues.

What would you like to be improved?

Currently, when cleaning up snapshots, if the service crashes or restarts, the ongoing physical file deletion process will be interrupted and cannot resume. These service restarts are often caused by OOM issues, which may be related to an excessive number of file paths to delete (e.g., millions of expired historical files).

How should we improve?

To address this issue, I propose the following suggestions:

  1. Persist the state of expired snapshots so that the file deletion process can resume after a service restart.
  2. Avoid expiring a large number of historical files all at once by performing the cleanup in batches.

Are you willing to submit PR?

  • [x] Yes I am willing to submit a PR!

Subtasks

No response

Code of Conduct

xxubai avatar Jun 11 '25 06:06 xxubai