You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Mahendra M (JIRA)" <ji...@apache.org> on 2013/09/03 08:20:51 UTC

[jira] [Commented] (LIBCLOUD-378) S3 uploads fail on small iterators

    [ https://issues.apache.org/jira/browse/LIBCLOUD-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756386#comment-13756386 ] 

Mahendra M commented on LIBCLOUD-378:
-------------------------------------

Yep, I agree with [~jc2k]. Setting fill_size=True makes it work. (Strange, I always thought that fill_size was the default action).

Uploaded a patch for this.

Refactoring the code for making it fall to a normal upload for size less than 4MB would make the code a bit complicated. I will look into it

                
> S3 uploads fail on small iterators
> ----------------------------------
>
>                 Key: LIBCLOUD-378
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-378
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Storage
>            Reporter: John Carr
>
> I wrote a small script that uploaded the output of a buildbot job and then updated an XML file. The large binary blob worked fine. However the XML file failed.
> I was using the driver.upload_object_via_stream(iterator=StringIO.StringIO(somexml)) style as in the docs.
> Looking at the LIBCLOUD_DEBUG output the driver was using the S3 multi-part upload API and making a new "part" for each line - so every 7 bytes or so - but the minimum size for a part upload was 5mb.
> (I don't know if the first part is allowed to be less than 5mb if the entire upload is less than 5mb).
> I am working around this by forcing multi-part uploads off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira