libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahen...@apache.org
Subject git commit: LIBCLOUD-378: S3 uploads fail on small iterators
Date Tue, 03 Sep 2013 11:22:24 GMT
Updated Branches:
  refs/heads/trunk 12b830889 -> 735b5b877


LIBCLOUD-378: S3 uploads fail on small iterators


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/735b5b87
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/735b5b87
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/735b5b87

Branch: refs/heads/trunk
Commit: 735b5b877f2750e75aca07e351d3d8ae7a675fac
Parents: 12b8308
Author: Mahendra M <mahendra@apache.org>
Authored: Tue Sep 3 16:50:37 2013 +0530
Committer: Mahendra M <mahendra@apache.org>
Committed: Tue Sep 3 16:50:37 2013 +0530

----------------------------------------------------------------------
 CHANGES                        | 4 ++++
 libcloud/storage/drivers/s3.py | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/735b5b87/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ebd0312..a956f87 100644
--- a/CHANGES
+++ b/CHANGES
@@ -103,6 +103,10 @@ Changes with Apache Libcloud in development
       driver. (LIBCLOUD-373)
       [Stefan Friesel]
 
+    - Ensure that AWS S3 multipart upload works for small iterators.
+      (LIBCLOUD-378)
+      [Mahendra M]
+
   *) Load Balancer
 
    - Expose CloudStack driver directly through the Provider.CLOUDSTACK

http://git-wip-us.apache.org/repos/asf/libcloud/blob/735b5b87/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 9930641..0b54297 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -522,7 +522,8 @@ class S3StorageDriver(StorageDriver):
         params = {'uploadId': upload_id}
 
         # Read the input data in chunk sizes suitable for AWS
-        for data in read_in_chunks(iterator, chunk_size=CHUNK_SIZE):
+        for data in read_in_chunks(iterator, chunk_size=CHUNK_SIZE,
+                                   fill_size=True):
             bytes_transferred += len(data)
 
             if calculate_hash:


Mime
View raw message