Marton Elek created HDDS-4193: --------------------------------- Summary: Range used by S3 MultipartUpload copy-from-source should be incusive Key: HDDS-4193 URL: https://issues.apache.org/jira/browse/HDDS-4193 Project: Hadoop Distributed Data Store Issue Type: Improvement Reporter: Marton Elek Assignee: Marton Elek
S3 API provides a feature to copy a specific range from an existing key. Based on the documentation, this range definitions is inclusive: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html {quote} -copy-source-range (string) The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB. {quote} But as it's visible from our [robot test|http://example.com], in our case we use exclusive range: {code} upload-part-copy ... --copy-source-range bytes=0-10485758 upload-part-copy ... --copy-source-range bytes=10485758-10485760 {code} Based on this AWS documentation it should return with a (10485758 + 1) + 3 bytes long key, which is impossible if our original source key is just 10485760. I think the right usage to get the original key is the following: {code} upload-part-copy ... --copy-source-range bytes=0-10485757 upload-part-copy ... --copy-source-range bytes=10485758-10485759 {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org