Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

JCLOUDS-1368: Correct use of slicing algorithm #1166

Merged
merged 3 commits into from Jan 9, 2018

Conversation

gaul
Copy link
Member

@gaul gaul commented Jan 4, 2018

MultipartUploadSlicingAlgorithm creates multiple equal-sized parts and
a remaining amount. BaseBlobStore.putMultipartBlob used this
interface incorrectly, which could create more parts than intended
since the remaining size could be larger than the part size. This
manifested with Google Cloud Storage which only allows 32 parts.

@gaul gaul changed the title JCLOUDS-1368: Simplify slicing algorithm JCLOUDS-1368: Correct use of slicing algorithm Jan 4, 2018
@gaul
Copy link
Member Author

gaul commented Jan 4, 2018

I reworked this commit to correct the use of the slicing algorithm. JCLOUDS-1369 tracks improving the algorithm itself.

@gaul gaul force-pushed the gcs-large-upload branch 2 times, most recently from 7da53f5 to 94d519a Compare January 5, 2018 01:36
Previously this method only reported whether it created a container or
not and callers could not determine whether there was an error or if
the container already existed.  References gaul/s3proxy#122.
MultipartUploadSlicingAlgorithm creates multiple equal-sized parts and
a remaining amount.  BaseBlobStore.putMultipartBlob used this
interface incorrectly, which could create more parts than intended
since the remaining size could be larger than the part size.  This
manifested with Google Cloud Storage which only allows 32 parts.
Previously with GCS and its maximum 32 parts, the slicing algorithm
would sliced 3.2 GB blobs into (31) 32 MB parts and (1) 2.3 GB part.
With this algorithm it creates (31) 100 MB parts and (1) smaller part.
@jclouds-mirror jclouds-mirror merged commit 8cd68a3 into jclouds:master Jan 9, 2018
@gaul gaul deleted the gcs-large-upload branch January 9, 2018 21:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants