Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor deletion of all files on exit #2173

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Conversation

afranken
Copy link
Member

@afranken afranken commented Dec 17, 2024

Description

Refactor deletion at exit to use a DisposableBean instead of File#deleteOnExit().
Also: close all InputStreams and OutputStreams.

Related Issue

#2143

Tasks

  • I have signed the CLA.
  • I have written tests and verified that they fail without my change.

@afranken afranken force-pushed the 2143-fix-file-deletion branch 2 times, most recently from 19894bf to d2c3600 Compare December 18, 2024 22:56
A user in #2143 reported that even though they regularly delete objects
in S3Mock, space is not freed until they restart S3Mock. I suspect that
the "deleteOnExit()" functionality retains a file handle even of the
file is deleted.

Fixes #2143
@afranken afranken force-pushed the 2143-fix-file-deletion branch from 7391ddc to 15735b9 Compare December 19, 2024 21:45
@afranken afranken self-assigned this Dec 19, 2024
@afranken afranken merged commit b30d8bc into main Dec 19, 2024
6 checks passed
@afranken afranken deleted the 2143-fix-file-deletion branch December 19, 2024 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant