swamirishi commented on code in PR #4944:
URL: https://github.com/apache/ozone/pull/4944#discussion_r1236075135
##########
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,
key);
modifyDiffs.add(codecRegistry.asRawData(entry));
- } else { // Key Renamed.
+ } else if (!isBlockLocationSame(snapshotDiffObject.getOldKeyName(),
+ snapshotDiffObject.getNewKeyName(), fsTable, tsTable)) {
+ String oldKey = codecRegistry.asObject(oldKeyName, String.class);
+ String newKey = codecRegistry.asObject(newKeyName, String.class);
+ renameDiffs.add(codecRegistry.asRawData(
Review Comment:
it need not be rename every time. We need to check if oldKey != newKeyName.
You can just add the condition if the location versions are same in the else {}
condition instead of adding another else if in the if else ladder
--
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]