Ren Koike created HDDS-14873:
--------------------------------
Summary: Refactor OMRequest OBS/FSO class pairs
Key: HDDS-14873
URL: https://issues.apache.org/jira/browse/HDDS-14873
Project: Apache Ozone
Issue Type: Improvement
Components: OM
Reporter: Ren Koike
Assignee: Ren Koike
There are around 40-70% duplicates between OBS/FSO implementations in
{{OMRequest}} implementations.
The primary cause is full override of {{validateAndUpdateCache()}} in FSO
classes when only key lookup, cache update, and response creation differ.
The goal is to identify opportunities to reduce code duplication between
layout-specific implementations and refactor them if necessary.
h2. Analysis Coverage
||#||Type of request||# of Classes ||OBS Lines||FSO Lines||Duplication||
|01|OMKeyCreateRequest|2|~400|~300|~35%|
|02|OMKeyCommitRequest|2|~400|~350|~40%|
|03|OMKeyDeleteRequest|2|~350|~280|~45%|
|04|OMKeysDeleteRequest|2|405|186|~20%|
|05|OMKeyRenameRequest|2|303|421|~40%|
|06|OMAllocateBlockRequest|2|327|236|~75%|
|07|OMKeySetTimesRequest|2|264|162|~55%|
|08|OMDirectoryCreateRequest|2|316|227|~65%|
|09|OMFileCreateRequest|2|439|261|~55%|
|10|S3MultipartUploadRequests|8|1845|585|Mixed|
|11|OMKeyAclRequests|8|1480|508|~70%|
|12|S3TaggingRequests|4|384|348|~70%|
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]