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

fix: output stream on LockedWriters where not closing themselves #24

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

cmhulbert
Copy link
Contributor

When getting a new S3OutputStream for writing, the object is actually written to s3 when it is closed(). However, the LockedChannel doesn't not keep track of and close the generated S3OutputStreams when the channel itself is closed.

In practice, this only is an issue with BloscCompression, because all the other compressors call close on the S3OutputStream after receiving them, and writing to them. BloscCompression does not though.

This ensures close() is called on all S3OutputStreams generated by the AmazonS3KeyValueAccess.

Not part of this PR, but some more thought should go into the Compressor implementations, to determine whether they should close the output stream they are passed or not. My current thought is that the KVAs should be responsible for closing the OutputStreams that they create. And the underlying calls to write into them by the Compressors should write into them, but not close.

@bogovicj bogovicj merged commit 4a840b9 into master Feb 22, 2024
3 checks passed
@bogovicj
Copy link
Contributor

Can replicate bug and confirm that this fixes it.

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.

2 participants