[ 
https://issues.apache.org/jira/browse/HDDS-6426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502560#comment-17502560
 ] 

Ethan Rose commented on HDDS-6426:
----------------------------------

IMO OMMetadataManager#getKeyTable should only return the key table, and 
OMMetadataManager#getFileTable should be used to retrieve the file table. This 
will not introduce any new branching since a different key format would be 
needed to query the tables anyways once the resulting table is retrieved.

> OM keyTable and fileTable are not interchangeable
> -------------------------------------------------
>
>                 Key: HDDS-6426
>                 URL: https://issues.apache.org/jira/browse/HDDS-6426
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: OM
>            Reporter: Ethan Rose
>            Priority: Major
>
> HDDS-5835 changed OMMetadataManager#getKeyTable to return a different table 
> based on the bucket layout: fileTable for FSO buckets, keyTable otherwise. 
> The problem is that these two tables have completely different sets of keys 
> and key formats. It is not enough to change existing requests expecting to 
> operate on the key table to now point to the file table if they are invoked 
> on an FSO bucket, because they will query the table with the wrong key format.
> This implementation is misleading for developers (you ask for a keyTable and 
> might get a fileTable instead) and caused HDDS-6414, while possibly masking 
> other similar bugs for existing requests. This Jira is to consider a less 
> error-prone approach.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to