amoro
amoro copied to clipboard
[Improvement]: Improve the stability of deleting expired files
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:
- Persist the state of expired snapshots so that the file deletion process can resume after a service restart.
- 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
- [x] I agree to follow this project's Code of Conduct