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


##########
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:
   Is renaming/moving a directory considered as 'modified'?
   For example:
   1. Rename /path_1/dir_1 to /path_1/dir_2
   2. Move /path_1/dir_1 to /path_2/dir_1
   



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