HDDS-15618. Fix ListObjects to include single whitespace-only S3 object keys#10589
Open
Gargi-jais11 wants to merge 1 commit into
Open
HDDS-15618. Fix ListObjects to include single whitespace-only S3 object keys#10589Gargi-jais11 wants to merge 1 commit into
Gargi-jais11 wants to merge 1 commit into
Conversation
priyeshkaratha
approved these changes
Jun 23, 2026
priyeshkaratha
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Gargi-jais11 for the patch. Changes LGTM
ivandika3
reviewed
Jun 23, 2026
ivandika3
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Gargi-jais11 , left one comment.
Comment on lines
+1311
to
+1313
| for (int i = 0; i < keyNames.size(); i++) { | ||
| addKeysToOM(volumeName, bucketName, keyNames.get(i), i); | ||
| } |
Contributor
There was a problem hiding this comment.
I'd prefer if we actually have an S3 integration test to prove that Ozone actually accepts a blank key (I'm not sure if it does). If OM does not accept a blank key, then the S3 single white space case will never be exercised.
Contributor
|
Thanks @Gargi-jais11 for working on this. As far as I know, HDFS doesn't support filenames with spaces. I'm concerning about how this change impact that. Have you looked into it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
s3-tests
test_bucket_create_special_key_namesfails because a key named**' '**is created but not returned by ListObjects.OmMetadataManagerImpl.getOzoneKey()usesStringUtils.isNotBlank(), which treats whitespace-only keys as absent, so the object is stored under /volume/bucket instead of /volume/bucket/.List object uses prefix
/volume/bucket/, so the key is omitted. Fix key encoding to allow whitespace-only namesWhat is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15618
How was this patch tested?
Added unit test.