Code review comment for lp://qastaging/~gaurav-gangalwar/swift/copy_manifest

Revision history for this message
gholt (gholt) wrote :

Yes, the specific reason is that there are a few things you may want to do with an existing segmented object:

1) Make a "shallow" copy where there's just a new manifest file pointing to the same segments.

2) Make a "deep" copy where the segments are all copied to new locations as well as a new manifest.

3) Make a "consolidated" copy where a bunch of segments are concatenated into one new object. The original object may have been segmented to make uploading easier (smaller chunks) or faster (parallel segment uploading) but the final object might be better to work with consolidated.

For 1) it is as simple as a 0-byte PUT with X-Object-Manifest set to the same segments path.

For 2) you have to copy each segment independently and then do the new 0-byte PUT with the X-Object-Manifest set to the new segments path.

For 3) you can do a COPY from the segmented object and the Destination will end up with a single segment object.

If you make COPY do essentially what 1) is, there is no way to do 3) server-side.

« Back to merge proposal