You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Mohammad Arafat Khan (Jira)" <ji...@apache.org> on 2023/03/27 17:49:00 UTC

[jira] [Resolved] (HDDS-8284) containerKeyTable from Recon Container DB does not store FileSystem keys correctly

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

Mohammad Arafat Khan resolved HDDS-8284.
----------------------------------------
    Resolution: Invalid

> containerKeyTable from Recon Container DB does not store FileSystem keys correctly 
> -----------------------------------------------------------------------------------
>
>                 Key: HDDS-8284
>                 URL: https://issues.apache.org/jira/browse/HDDS-8284
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Recon
>            Reporter: Mohammad Arafat Khan
>            Assignee: Mohammad Arafat Khan
>            Priority: Major
>
> Legacy buckets in Apache Ozone can function both as FileSystem buckets and as ObjectStore buckets. The KeyTable stores both the directory path and the key path for each object. The way of differentiating between a directory and a file in the KeyTable is by checking if the directory path ends with a trailing *{{/}}* character.
> Therefore, each directory can be considered a separate record in the KeyTable. When creating the mapping between the container and the key in the *{{ContainerKey}}* table, it is necessary to include the directories as well. However, this is currently not being done.
> For example, if a legacy bucket has the *{{ozone.om.enable.filesystem.paths}}* configuration set to {*}{{TRUE}}{*}, indicating that it behaves as a FileSystem bucket, and the following keys are created:
>  * *{{/s3v/legacy-bucket/dir1/dir2/dir3/key1-legacy}}*
>  * *{{/s3v/legacy-bucket/dir1/dir2/dir4/key2-legacy}}*
>  * *{{/s3v/legacy-bucket/dir1/key1-legacy}}*
>  * *{{/s3v/legacy-bucket/key1-legacy}}*
>  * *{{/vol/bucket/key1-legacy}}*
> The KeyTable would store each key along with its directory path. However, the *{{ContainerKey}}* table mapping would only include the keys and not the directories, resulting in an incomplete mapping.
> *Key Table ➖*
> ||Key : (Key-Prefix) ||Value : (Object)||
> |/s3v/legacy-bucket/dir1/|OmKeyInfo|
> |/s3v/legacy-bucket/dir1/dir2/|OmKeyInfo|
> |/s3v/legacy-bucket/dir1/dir2/dir3/|OmKeyInfo|
> |/s3v/legacy-bucket/dir1/dir2/dir3/key1-legacy|OmKeyInfo|
> |/s3v/legacy-bucket/dir1/dir2/dir4/|OmKeyInfo|
> |/s3v/legacy-bucket/dir1/dir2/dir4/key2-legacy|OmKeyInfo|
> |/s3v/legacy-bucket/dir1/key1-legacy|OmKeyInfo|
> |/s3v/legacy-bucket/key1-legacy|OmKeyInfo|
> |/vol/bucket/key1-legacy|OmKeyInfo|
> The corresponding containerKey table built on the above data would be :- 
> *Container-Key Table ➖* 
> ||Key : (KeyPrefix)||Value : (Container-ID)||
> |/s3v/legacy-bucket/dir1/dir2/dir3/key1-legacy|1|
> |/s3v/legacy-bucket/key1-legacy|1|
> |/vol/bucket/key1-legacy|2|
> |/s3v/legacy-bucket/dir1/dir2/dir4/key-legacy|3|
> |/s3v/legacy-bucket/dir1/key1-legacy|3|
> As you can see we only have mappings done for the Keys and not the directories.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org