[
https://issues.apache.org/jira/browse/HDDS-13503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18027865#comment-18027865
]
Yu-Chuan Hung commented on HDDS-13503:
--------------------------------------
Could I give it a try?
> Refactor S3MultipartUploadCommitPartRequest.validateAndUpdateCache for
> readability and maintainability
> ------------------------------------------------------------------------------------------------------
>
> Key: HDDS-13503
> URL: https://issues.apache.org/jira/browse/HDDS-13503
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Mahesh kumar gaddam
> Priority: Major
>
> Refactor {{S3MultipartUploadCommitPartRequest.validateAndUpdateCache}} for
> readability and maintainability
> *Description:*
> The {{validateAndUpdateCache}} method in
> {{S3MultipartUploadCommitPartRequest}} has grown complex due to recent
> enhancements for handling uncommitted blocks and overwritten parts. The logic
> for building the {{keyToDeleteMap}} and managing pseudo-keys can be extracted
> into helper methods for better readability, modularity, and testability.
> *Proposed Improvements:*
> * *Extract Helper Methods:*
> ** Introduce a {{buildKeyDeletionMap}} method to handle the creation of
> {{RepeatedOmKeyInfo}} for old keys and uncommitted pseudo-keys.
> ** Move pseudo-key creation logic to a dedicated utility method.
> * *Improve Logging:*
> ** Add {{LOG.debug}} statements when pseudo-keys or overwritten keys are
> added to {{DeletedTable}} for easier troubleshooting.
> * *Update Javadocs:*
> ** Update outdated references (e.g., {{{}oldPartKeyInfo{}}}) in method
> documentation.
> * *Enhance Unit Tests:*
> ** Create focused unit tests for helper methods to ensure they work
> independently.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]