[
https://issues.apache.org/jira/browse/HDDS-12892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947186#comment-17947186
]
Ivan Andika edited comment on HDDS-12892 at 4/25/25 2:23 AM:
-------------------------------------------------------------
[~weichiu] [~aswinshakil] Thanks for filing this. Can I check about the
difference between OmKeyInfo keyName and fileName?
>From the OmKeyInfo comment fileName should be the leaf node name, while the
>keyName should be the full key name.
!image-2025-04-25-09-43-50-453.png!
[https://github.com/apache/ozone/blob/68452d057391fb197ab62136e0039fb208ccc8c1/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java#L91]
So for key "dir1/dir2/file", the keyName should be "dir1/dir2/file", while the
fileName should be "file", as shown
OzoneFSUtils.getFileName(keyInfo.getKeyName()) in OmKeyInfo#getFromProtobuf
([https://github.com/apache/ozone/blob/68452d057391fb197ab62136e0039fb208ccc8c1/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java#L788]).
Means that fileName can be derived from keyName.
> We need a consistent way to handle this
I agree, there are a lot of different usage of setKeyName that might be
inconsistent because there are a lot of ways of mutating the OmKeyInfo in
unpredictable ways. I think the cleanest way is to make OmKeyInfo immutable by
removing all the setters (or at least setKeyName and setFileName), and only
create use the builder to create a new OmKeyInfo object. However, this way
might put a lot of pressure in OM memory.
was (Author: JIRAUSER298977):
[~weichiu] [~aswinshakil] Thanks for filing this. Can I check about the
difference between OmKeyInfo keyName and fileName?
>From the OmKeyInfo comment fileName should be the leaf node name, while the
>keyName should be the full key name.
!image-2025-04-25-09-43-50-453.png!
[https://github.com/apache/ozone/blob/68452d057391fb197ab62136e0039fb208ccc8c1/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java#L91]
So for key "dir1/dir2/file", the keyName should be "dir1/dir2/file", while the
fileName should be "file", as shown
OzoneFSUtils.getFileName(keyInfo.getKeyName()) in OmKeyInfo#getFromProtobuf
([https://github.com/apache/ozone/blob/68452d057391fb197ab62136e0039fb208ccc8c1/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java#L788]).
Means that fileName can be derived from keyName.
> We need a consistent way to handle this
I agree, there are a lot of different usage of setKeyName that might be
inconsistent because there are a lot of ways of mutating the OmKeyInfo in
unpredictable ways. I think the cleanest way is to make OmKeyInfo immutable by
removing all the setters (or at least setKeyName and setFileName), and only
create use the builder to create a new OmKeyInfo object. However, this ways
might put a lot of pressure in OM memory.
> S3PutObjectTaggingResponseWithFSO and S3DeleteObjectTaggingRequestWithFSO is
> incorrectly setting full path as key name
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: HDDS-12892
> URL: https://issues.apache.org/jira/browse/HDDS-12892
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Aswin Shakil
> Assignee: Ivan Andika
> Priority: Major
> Attachments: image-2025-04-25-09-43-50-453.png
>
>
> These requests S3PutObjectTaggingResponseWithFSO and
> S3DeleteObjectTaggingRequestWithFSO are setting the key name for FSO bucket
> keys as full path name. I should be just the file name.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]