You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ashishkumar50 (via GitHub)" <gi...@apache.org> on 2023/05/19 18:13:03 UTC

[GitHub] [ozone] ashishkumar50 commented on a diff in pull request #4745: HDDS-8657. Remove Clone and make use of copyObject in OmDirectoryInfo and OmKeyInfo.

ashishkumar50 commented on code in PR #4745:
URL: https://github.com/apache/ozone/pull/4745#discussion_r1199244070


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneListStatusHelper.java:
##########
@@ -442,10 +443,19 @@ private void getCacheValues() {
         }
 
         // Copy cache value to local copy and work on it
-        Value copyOmInfo = ObjectUtils.clone(cacheOmInfo);
+        Value copyOmInfo = null;
+        try {
+          if (cacheOmInfo instanceof ICopyObjectInfo) {
+            Method m = cacheOmInfo.getClass().getMethod("copyObject");
+            copyOmInfo = (Value) m.invoke(cacheOmInfo);
+          }
+        } catch (Exception e) {
+          LOG.debug("No such method, use same cache copy");
+        }

Review Comment:
   @szetszwo, Thanks for the comments, All comments are fixed.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org