Copilot commented on code in PR #9128:
URL: https://github.com/apache/ozone/pull/9128#discussion_r2426799867
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServletInodeBasedXfer.java:
##########
@@ -443,7 +442,9 @@ private boolean writeDBToArchive(Set<String>
sstFilesToExclude, Path dbDir, Atom
if (path.contains(OM_CHECKPOINT_DIR)) {
path =
getDbStore().getDbLocation().toPath().resolve(dbFile.getFileName()).toAbsolutePath().toString();
}
- hardLinkFileMap.put(path, fileId);
+ if (hardLinkFileMap != null) {
+ hardLinkFileMap.put(path, fileId);
+ }
Review Comment:
The null check for hardLinkFileMap should be moved before the path
manipulation logic above it. This would avoid unnecessary path processing when
hardLinkFileMap is null, improving performance and code clarity.
--
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]