Skip to content

Ensure file handles are correctly disposed#451

Merged
nblumhardt merged 5 commits intodatalust:devfrom
KodrAus:fix/invalid-delete
Mar 30, 2026
Merged

Ensure file handles are correctly disposed#451
nblumhardt merged 5 commits intodatalust:devfrom
KodrAus:fix/invalid-delete

Conversation

@KodrAus
Copy link
Copy Markdown
Member

@KodrAus KodrAus commented Mar 27, 2026

For #448

This PR aims to track down potential file handle leakage in the forwarder's storage engine due to missing Dispose calls, of which there are a few in BufferReader. The test filesystem now tracks active handles and throws when attempting to delete a file with any active. I'll also update it to run a real tmp directory side-by-side and compare the results.

@KodrAus KodrAus marked this pull request as ready for review March 30, 2026 06:21
@KodrAus
Copy link
Copy Markdown
Member Author

KodrAus commented Mar 30, 2026

I’ve updated our test infrastructure here to run against both the real and in-memory filesystems and refactored the chunk reading logic so it’s clearer, fixing a few issues along the way.

I think this should be good for a review now, but would like to kick the tyres a bit more to be sure there aren’t any other degenerate cases lurking.

Copy link
Copy Markdown
Contributor

@liammclennan liammclennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@nblumhardt nblumhardt merged commit eb13448 into datalust:dev Mar 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants