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

api: Single putObject can use temporary file always. #703

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

harshavardhana
Copy link
Member

This code simplification also addresses bugs which
can arise from issues like #702 where error handling
in multiple conditions is cryptic.

Benefit of this fix is also that we are not going
to buffer memory if there are lot of copy operations,
since our min-part size has increased to 64MB using
bytes buffer may cause each file copy to use 128MB
worth of memory due to bytes.Buffer growth strategy
used in go standard library.

Incidentally this change fixes #702

This code simplification also addresses bugs which
can arise from issues like minio#702 where error handling
in multiple conditions is cryptic.

Benefit of this fix is also that we are not going
to buffer memory if there are lot of copy operations,
since our min-part size has increased to 64MB using
bytes buffer may cause each file copy to use 128MB
worth of memory due to `bytes.Buffer` growth strategy
used in go standard library.

Incidentally this change fixes minio#702
Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

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

The changes look good to me. The test program in the issue doesn't error out as described in the issue. So, couldn't verify if this PR fixed the issue by testing.

@harshavardhana
Copy link
Member Author

The error occurs only when you restrict the bucket with some I AM policy . I have creds for that for you to verify if needed. @krisis

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM, single and multipart uploads tested.

Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

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

LGTM. Tested on AWS S3.

@harshavardhana harshavardhana merged commit 8d69ba8 into minio:master Jun 13, 2017
@harshavardhana harshavardhana deleted the putobject branch June 13, 2017 08:16
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.

PutObject() with unsizeable reader on restricted account only returns io.EOF?
3 participants