S3: implement ObjectParts in GetObjectAttributes #12764
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As reported by #12757, we dit not return the full
ObjectParts
response in S3.The behavior is different if the checksum specified when creating the Multipart Upload with
CreateMultipartUpload
is of typeCOMPOSITE
orFULL_OBJECT
. When it isCOMPOSITE
, any call toGetObjectAttributes
with theObjectParts
attribute specified should act like aListParts
call.There was a TODO left about it, and this PR implements it.
It needed a change in API as we were not saving the metadata related to the Parts used to create the end object (we only store the data necessary to support
PartNumber
inGetObject
, via theget_part_range
function). This minor change in API is properly covered defensively to avoid issues when using this functionality (GetObject
with thePartNumber
parameter, or theGetObjectAttributes
call) with a restored state from a previous version.Changes
GetObjectAttributes
withObjectParts
specified