[ 
https://issues.apache.org/jira/browse/HDDS-15739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Siyao Meng resolved HDDS-15739.
-------------------------------
    Fix Version/s: 2.3.0
       Resolution: Fixed

> Fix ListObjectsV2 continuation-token: wrong XML element name and empty-token 
> handling
> -------------------------------------------------------------------------------------
>
>                 Key: HDDS-15739
>                 URL: https://issues.apache.org/jira/browse/HDDS-15739
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Huang Kuan Hao
>            Assignee: Huang Kuan Hao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> ListObjectsV2 has two server-side bugs around the continuation token that 
> make S3 SDK clients fail:
> 1. Wrong response element name. The echoed request continuation token is 
> serialized as <continueToken> instead of AWS's <ContinuationToken>. botocore 
> therefore never populates response['ContinuationToken'], causing a KeyError 
> in clients that read it back.
> 2. Empty token is not treated as "no token". An empty ContinuationToken='' is 
> passed non-null into ContinueToken.decodeFromString(), which finds no 
> separator and throws InvalidArgument. AWS treats an empty continuation token 
> as no token — return all keys, IsTruncated=false, and echo '' back.
> To align with AWS S3:
> - Serialize the response continuation token as ContinuationToken.
> - Treat a null/empty continuation-token query param as absent (list from the 
> start) rather than decoding it.
> Failing Ceph s3-tests:
> - test_bucket_listv2_continuationtoken
> - test_bucket_listv2_continuationtoken_empty
> - test_bucket_listv2_both_continuationtoken_startafter
> Code pointers:
> - hadoop-ozone/s3gateway/.../endpoint/ListObjectResponse.java (~L72–73: 
> @XmlElement(name = "continueToken") → ContinuationToken)
> - hadoop-ozone/s3gateway/.../endpoint/BucketEndpoint.java (L108–131, 175 — 
> guard empty token before decode)
> - hadoop-ozone/s3gateway/.../endpoint/ContinueToken.java (L84–88 
> decodeFromString)
> Ref: https://ozone.s3.peterxcli.dev/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to