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

Sorter#_merge() not closing streams correctly. #8

Closed
tjoneslo opened this issue Jul 28, 2013 · 2 comments
Closed

Sorter#_merge() not closing streams correctly. #8

tjoneslo opened this issue Jul 28, 2013 · 2 comments

Comments

@tjoneslo
Copy link

In the method Sorter#_merge(), the list of data readers is never closed. Which means the finally block where the input files are deleted, the files won't be deleted until the GC finally notices the open files are no longer used, then closes them and deletes the files.

I'm using the merge-sort as part of a much large, long running process which means the files may be left open, and on disk, for a significant period of time.

@cowtowncoder
Copy link
Owner

Regrettable oversight. Thank you for reporting this, will fix for next release.

@cowtowncoder
Copy link
Owner

Ok: although underlying readers should close on end-of-input (at least std DataReader implementations do), I added appropriate close logic for merged streams as well.
If you can build locally from master branch, test this out, that would be great: I hope to release 0.8.1 soon, assuming this fix works.

cowtowncoder added a commit that referenced this issue Aug 1, 2013
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

No branches or pull requests

2 participants