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

Abort failed multipart uploads on RuntimeException #786

Conversation

Dorthu
Copy link
Contributor

@Dorthu Dorthu commented Aug 6, 2019

If a file > 5MB is being uploaded to a bucket, this client will initiate
a multipart upload. However, if in the course of uploading that file a
RuntimeException occurs, this library will not abort the multipart
upload. This is especially possible when streaming data across a
network connection into a bucket. This was introduced in #741 when
resuming failed multipart uploads was removed.

Reproduction steps:

  • Use this script: https://gist.github.com/Dorthu/b75f2a4ad9e0e453a040412438d3fe32
  • Replace the server URL and port, access key, secret key, and bucket name with
    valid values
  • Compile/run the script
  • Observe the state of multipart uploads in the bucket after running
    with s3cmd multipart s3://bucket-name (or another tool)

Subsequent runs of the script create new multipart uploads in the
bucket.

I specifically noticed this bug when using this library against Ceph, if
that's relevant.

If a file > 5MB is being uploaded to a bucket, this client will initiate
a multipart upload.  However, if in the course of uploading that file a
RuntimeException occurs, this library will not abort the multipart
upload.  This is especially possible when streaming data across a
network connection into a bucket.  This was introduced in minio#741 when
resuming failed multipart uploads was removed.

Reproduction steps:

* Use this script: https://gist.github.com/Dorthu/b75f2a4ad9e0e453a040412438d3fe32
* Replace the server URL and port, access key, secret key, and bucket name with
  valid values
* Compile/run the script
* Observe the state of multipart uploads in the bucket after running
  with `s3cmd multipart s3://bucket-name` (or another tool)

Subsequent runs of the script create new multipart uploads in the
bucket.

I specifically noticed this bug when using this library against Ceph, if
that's relevant.
Copy link
Contributor

@sinhaashish sinhaashish left a comment

Choose a reason for hiding this comment

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

LGTM

@nitisht nitisht merged commit df11de1 into minio:master Aug 7, 2019
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.

4 participants