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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -1040,7 +1078,19 @@ long generateDiffReport(final String jobId,
                 SnapshotDiffReportOzone.getDiffReportEntry(DiffType.MODIFY,

Review Comment:
   In case of two renames ending up back to same name we might end up with a 
modify entry, which we are ok with a rename entry (ideally that also shouldn't 
be there) since it is just a meta change but modify will be expensive as we 
will end up copying the whole data all over again.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -1040,7 +1078,19 @@ long generateDiffReport(final String jobId,
                 SnapshotDiffReportOzone.getDiffReportEntry(DiffType.MODIFY,

Review Comment:
   ```suggestion
                   else { // Key modified.
                   if (!Arrays.equals(oldKeyName, newKeyName)) {
                        String key = codecRegistry.asObject(newKeyName, 
String.class);
               DiffReportEntry entry =
                   SnapshotDiffReportOzone.getDiffReportEntry(DiffType.RENAME, 
oldKeyName, newKeyName);
                   }
                   if (!isBlockLocationSame(snapshotDiffObject.getOldKeyName(),
                 snapshotDiffObject.getNewKeyName(), fsTable, tsTable)){
                 DiffReportEntry entry =
                   SnapshotDiffReportOzone.getDiffReportEntry(DiffType.MODIFY, 
key);
                          
                   }
                   
               }        
   ```



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