swamirishi commented on code in PR #4991:
URL: https://github.com/apache/ozone/pull/4991#discussion_r1244530215


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -1439,6 +1448,34 @@ long generateDiffReport(
     }
   }
 
+  private boolean isObjectModified(String fromObjectName, String toObjectName,
+      final Table<String, ? extends WithObjectID> fromSnapshotTable,
+      final Table<String, ? extends WithObjectID> toSnapshotTable)
+      throws IOException {
+    Objects.requireNonNull(fromObjectName, "fromObjectName is null.");
+    Objects.requireNonNull(toObjectName, "toObjectName is null.");
+
+    final WithObjectID fromObject = fromSnapshotTable.get(fromObjectName);
+    final WithObjectID toObject = toSnapshotTable.get(toObjectName);
+    if ((fromObject instanceof OmKeyInfo) && (toObject instanceof OmKeyInfo)) {
+      return !SnapshotDeletingService.isBlockLocationInfoSame(
+          (OmKeyInfo) fromObject, (OmKeyInfo) toObject);
+    } else if ((fromObject instanceof OmDirectoryInfo)
+        && (toObject instanceof OmDirectoryInfo)) {
+      return !areAclsSame((OmDirectoryInfo) fromObject,

Review Comment:
   Rename will not modify acls. Renames will occur as RENAME entry in Snapdiff. 
You can take a look at the test case.



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