Skip to content

HDDS-16073. Implement ObjectParts listing and pagination for completed multipart objects in GetObjectAttributes - #11020

Open
Gargi-jais11 wants to merge 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-16073
Open

HDDS-16073. Implement ObjectParts listing and pagination for completed multipart objects in GetObjectAttributes#11020
Gargi-jais11 wants to merge 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-16073

Conversation

@Gargi-jais11

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Phase 1 only returns ObjectParts.TotalPartsCount from the ETag suffix.

  • ObjectParts.Parts[] — Return PartNumber and Size for each part of a completed MPU object in the GetObjectAttributes XML response.
  • Pagination — Honor x-amz-max-parts and x-amz-part-number-marker; populate MaxParts, PartNumberMarker, NextPartNumberMarker, and IsTruncated per the S3 API.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16073

How was this patch tested?

Added unit test and integration test.
Manual testing:

// All parts (no pagination headers):
bash-5.1$ aws s3api get-object-attributes \
  --bucket attr-test \
  --key mpu-key \
  --object-attributes ObjectParts ETag ObjectSize \
  --endpoint-url $S3_ENDPOINT
{
    "LastModified": "Fri, 14 Aug 2026 05:27:28 GMT",
    "ETag": "c22cf5fdee60894e742ddda530c8b5b6-3",
    "ObjectParts": {
        "TotalPartsCount": 3,
        "IsTruncated": false,
        "Parts": [
            {
                "PartNumber": 1,
                "Size": 5242880
            },
            {
                "PartNumber": 2,
                "Size": 5242880
            },
            {
                "PartNumber": 3,
                "Size": 5242880
            }
        ]
    },
    "ObjectSize": 15728640
}

// Paginated — first page (max 2 parts):
bash-5.1$ aws s3api get-object-attributes \
  --bucket attr-test \
  --key mpu-key \
  --object-attributes ObjectParts \
  --max-parts 2 \
  --part-number-marker 0 \
  --endpoint-url $S3_ENDPOINT
{
    "LastModified": "Fri, 14 Aug 2026 05:27:28 GMT",
    "ObjectParts": {
        "TotalPartsCount": 3,
        "PartNumberMarker": 0,
        "NextPartNumberMarker": 2,
        "MaxParts": 2,
        "IsTruncated": true,
        "Parts": [
            {
                "PartNumber": 1,
                "Size": 5242880
            },
            {
                "PartNumber": 2,
                "Size": 5242880
            }
        ]
    }
}

// Second page (parts after marker 2):
bash-5.1$ aws s3api get-object-attributes \
  --bucket attr-test \
  --key mpu-key \
  --object-attributes ObjectParts \
  --max-parts 2 \
  --part-number-marker 2 \
  --endpoint-url $S3_ENDPOINT
{
    "LastModified": "Fri, 14 Aug 2026 05:27:28 GMT",
    "ObjectParts": {
        "TotalPartsCount": 3,
        "PartNumberMarker": 2,
        "MaxParts": 2,
        "IsTruncated": false,
        "Parts": [
            {
                "PartNumber": 3,
                "Size": 5242880
            }
        ]
    }
}

@Gargi-jais11
Gargi-jais11 marked this pull request as ready for review August 14, 2026 07:30
@Gargi-jais11 Gargi-jais11 added the s3 S3 Gateway label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 S3 Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant