Chung-En Lee created HDDS-17874:
-----------------------------------
Summary: ListObjects mishandles StartAfter=/ and keys starting
with / on OBS buckets
Key: HDDS-17874
URL: https://issues.apache.org/jira/browse/HDDS-17874
Project: Apache Ozone
Issue Type: Bug
Reporter: Chung-En Lee
On OBS buckets, ListObjects handles the key name {{/}} and keys starting with
{{/}} incorrectly.
Steps to reproduce:
# Create an OBS bucket with keys {{.cache/0}}, {{.cache/1}}, {{.cache/2}}.
# ListObjectsV2 with {{StartAfter=/}}.
# Create an OBS bucket with keys {{//double}}, {{/leading}}, {{/leading/x}},
{{m}}.
# ListObjectsV2 with {{Delimiter=/}}.
Actual: step 2 returns all three keys; step 4 returns CommonPrefixes {{/}} and
{{leading/}}.
Expected: step 2 returns an empty result; step 4 returns CommonPrefix {{/}} and
Content {{m}}, as on AWS S3.
OM maps the key name {{/}} to the bucket itself, so {{Prefix=/}} also reads
every key of the bucket from OM before S3 Gateway drops them. The shallow
listing drops the leading {{/}} of {{/leading/x}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]