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

Mohammad Arafat Khan closed HDDS-8284.
--------------------------------------

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to