Skip to content

Ensure file handles are correctly disposed#451

Open
KodrAus wants to merge 4 commits intodatalust:devfrom
KodrAus:fix/invalid-delete
Open

Ensure file handles are correctly disposed#451
KodrAus wants to merge 4 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.

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.

1 participant