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

Make some changes to PutObjectStreaming() API #657

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

harshavardhana
Copy link
Member

  • Detect size automatically like other PutObject() operations.
  • Allow progress bar to be passed into PutObjectStreaming().
  • Allow also metadata to be passed into PutObjectStreaming().
  • Rename NewStreamingV4 to just StreamingV4(). Keeping it
    consistent with other signature methods.

@harshavardhana harshavardhana force-pushed the multipart-streaming branch 2 times, most recently from bb44387 to ad58937 Compare April 23, 2017 07:07
@harshavardhana
Copy link
Member Author

This PR also fixes the bug #658


// If size cannot be found on a stream, it is not possible
// to upload using streaming signature.
if size < 0 {
Copy link
Member

@vadmeste vadmeste Apr 23, 2017

Choose a reason for hiding this comment

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

Can't we use multipart upload when we don't know the full size of the object?

  • miniog-go calls NewMultipartUpload which doesn't require to know the size of the object
  • minio-go tries to read at least 64MiB from io.Reader before it uploads the part.
  • then CompleteMultipartUpload

We need to disable parallel uploads here, also resuming upload should be avoided which means we need to create a new upload id each time we call PutObjectStreaming.

We can do this in a separate PR since there is no API breakage.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea will do, perhaps in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

@harshavardhana we should close #607 once @vadmeste's comments are addressed. This PR fixes #658.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done updated @krisis @vadmeste

- Detect size automatically like other PutObject() operations.
- Allow progress bar to be passed into PutObjectStreaming().
- Allow also metadata to be passed into PutObjectStreaming().
- Rename NewStreamingV4 to just StreamingV4(). Keeping it
  consistent with other signature methods.
// If size cannot be found on a stream, it is not possible
// to upload using streaming signature, fall back to multipart.
if size < 0 {
return c.putObjectMultipartStream(bucketName, objectName, reader, size, metadata, progress)
Copy link
Member

Choose a reason for hiding this comment

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

@harshavardhana shouldn't we be using c.putObjectMultipartStreamNoChecksum?

@harshavardhana harshavardhana merged commit e9431f3 into minio:master Apr 24, 2017
@harshavardhana harshavardhana deleted the multipart-streaming branch April 24, 2017 07:49
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.

3 participants