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

[GitHub] [ozone] smengcl commented on a diff in pull request #5258: HDDS-9236. Fix snapdiff output for key modification

smengcl commented on code in PR #5258:
URL: https://github.com/apache/ozone/pull/5258#discussion_r1322008458


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -1468,7 +1468,9 @@ private boolean isObjectModified(String fromObjectName, String toObjectName,
     final WithObjectID fromObject = fromSnapshotTable.get(fromObjectName);
     final WithObjectID toObject = toSnapshotTable.get(toObjectName);
     if ((fromObject instanceof OmKeyInfo) && (toObject instanceof OmKeyInfo)) {
-      return !SnapshotDeletingService.isBlockLocationInfoSame(
+      return !((OmKeyInfo) fromObject).isKeyInfoSame((OmKeyInfo) toObject,
+          false, false, false, false)
+          || !SnapshotDeletingService.isBlockLocationInfoSame(
           (OmKeyInfo) fromObject, (OmKeyInfo) toObject);

Review Comment:
   Ideally this should be one check for the key.
   
   Would you wrap this in a reasonably-named helper method for readability?



-- 
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