aryangupta1998 commented on code in PR #8423: URL: https://github.com/apache/ozone/pull/8423#discussion_r2086074381
########## hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java: ########## @@ -1217,6 +1222,28 @@ Set<String> getDeltaFiles(OmSnapshot fromSnapshot, toSnapshot.getSnapshotTableKey())); } + private Set<String> getDiffFiles(OmSnapshot fromSnapshot, OmSnapshot toSnapshot, List<String> tablesToLookUp) { + Set<String> diffFiles; + try { + Map<Object, String> fromSnapshotFiles = getSSTFileMapForSnapshot(fromSnapshot, tablesToLookUp); + Map<Object, String> toSnapshotFiles = getSSTFileMapForSnapshot(toSnapshot, tablesToLookUp); + diffFiles = Stream.concat( + fromSnapshotFiles.entrySet().stream() + .filter(e -> !toSnapshotFiles.containsKey(e.getKey())), + toSnapshotFiles.entrySet().stream() + .filter(e -> !fromSnapshotFiles.containsKey(e.getKey()))) + .map(Map.Entry::getValue) + .collect(Collectors.toSet()); + } catch (IOException e) { + // In case of exception during inode read use all files + LOG.error("Exception occurred while populating delta files for snapDiff", e); + diffFiles = new HashSet<>(); + diffFiles.addAll(getSSTFileListForSnapshot(fromSnapshot, tablesToLookUp)); + diffFiles.addAll(getSSTFileListForSnapshot(toSnapshot, tablesToLookUp)); Review Comment: Thanks for updating it! That’s a fair point. The log message is mainly intended to assist with debugging potential performance issues. If it feels unclear for someone unfamiliar with the context, we could consider expanding it slightly. That said, I believe it still adds value as-is, especially for developers investigating snap diff behavior or fallback scenarios. -- 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-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org