Gargi-jais11 opened a new pull request, #11242: URL: https://github.com/apache/ozone/pull/11242
## What changes were proposed in this pull request? Extend GetObjectAttributes ObjectParts handling so FSO layout buckets (Ozone’s equivalent of AWS directory buckets) return per-part <Part> elements (PartNumber, Size) even when no additional checksum was stored at upload time. This follows AWS S3 behavior documented in https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributesParts.html: General-purpose buckets: Part elements are omitted unless an additional checksum (x-amz-checksum-crc32, crc32c, sha1, sha256) was applied. Directory buckets: Part elements are returned regardless of checksum. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16362 ## How was this patch tested? Added IT and UT. ``` // FSO bucket getObjectAttributes returns parts info irrespective of checksum present or not bash-5.1$ aws s3api get-object-attributes --endpoint-url "$ENDPOINT" \ --bucket "$BUCKET" --key "$KEY" \ --object-attributes ObjectParts ObjectSize \ --output json | jq '.ObjectParts | {TotalPartsCount, IsTruncated, PartCount: (.Parts | length), Parts}' { "TotalPartsCount": 2, "IsTruncated": false, "PartCount": 2, "Parts": [ { "PartNumber": 1, "Size": 5242880 }, { "PartNumber": 2, "Size": 8 } ] } bash-5.1$ aws s3api get-object-attributes --endpoint-url "$ENDPOINT" \ --bucket "$BUCKET" --key "$KEY" \ --object-attributes ObjectParts --max-parts 1 --part-number-marker 0 \ --output json | jq '.ObjectParts | {IsTruncated, Parts}' { "IsTruncated": true, "Parts": [ { "PartNumber": 1, "Size": 5242880 } ] } // OBS bucket doesnot return part info if checksum not present bash-5.1$ aws s3api get-object-attributes --endpoint-url "$ENDPOINT" \ --bucket "$BUCKET" --key "$KEY" \ --object-attributes ObjectParts ObjectSize \ --output json | jq '.ObjectParts | {TotalPartsCount, IsTruncated, PartCount: (.Parts | length), Parts}' { "TotalPartsCount": 2, "IsTruncated": false, "PartCount": 0, "Parts": null } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
