Description
S3Client.uploadFile() starts a multipart upload with createMultipartUpload() but has no
error handling around the subsequent multipartUploadPart() or completeMultipartUpload()
calls. If any part upload or the completion step throws an exception, the multipart upload is
abandoned in S3 without being aborted. AWS charges for the storage consumed by incomplete
multipart uploads until they are explicitly aborted.
Steps to reproduce
- Call
uploadFile() with an Iterator<byte[]> that throws mid-iteration (or simulate a
network failure during a part upload).
- Observe that the incomplete multipart upload remains listed under
listMultipartUploads().
- Note that S3/MinIO continues to hold the uploaded bytes in staging storage.
Expected behavior
If any step after createMultipartUpload() fails, abortMultipartUpload() should be called
in a finally or catch block before the exception propagates to the caller.
Actual behavior
The upload ID is silently leaked. The partial upload persists until manually aborted.
Affected file
client/src/main/java/com/hedera/bucky/S3Client.java — uploadFile() method (~line 286)
Additional context
No response
Hedera network
No response
Version
v0.1.0
Operating system
None
Description
S3Client.uploadFile()starts a multipart upload withcreateMultipartUpload()but has noerror handling around the subsequent
multipartUploadPart()orcompleteMultipartUpload()calls. If any part upload or the completion step throws an exception, the multipart upload is
abandoned in S3 without being aborted. AWS charges for the storage consumed by incomplete
multipart uploads until they are explicitly aborted.
Steps to reproduce
uploadFile()with anIterator<byte[]>that throws mid-iteration (or simulate anetwork failure during a part upload).
listMultipartUploads().Expected behavior
If any step after
createMultipartUpload()fails,abortMultipartUpload()should be calledin a
finallyorcatchblock before the exception propagates to the caller.Actual behavior
The upload ID is silently leaked. The partial upload persists until manually aborted.
Affected file
client/src/main/java/com/hedera/bucky/S3Client.java—uploadFile()method (~line 286)Additional context
No response
Hedera network
No response
Version
v0.1.0
Operating system
None