JyotinderSingh opened a new pull request #3251:
URL: https://github.com/apache/ozone/pull/3251


   ## What changes were proposed in this pull request?
   
   [~HDDS-5835~](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/HDDS-6414), while possibly 
masking other similar bugs for existing requests.
   
   This patch introduces a new interface to define methods to build DB Keys to 
query entries inside the `keyTable` and `fileTable`. We introduce two 
implementations of this interface - one for FSO, and another for OBS/LEGACY.
   This should reduce the effort on developer side to handle key generation 
logic while writing new Request classes or tests.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6426
   
   ## How was this patch tested?
   
   Related unit tests
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to