Copilot commented on code in PR #9132:
URL: https://github.com/apache/ozone/pull/9132#discussion_r2426626667
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/OmSnapshotUtils.java:
##########
@@ -149,6 +150,10 @@ public static void createHardLinks(Path dbPath, boolean
deleteSourceFiles) throw
}
String from = parts[1];
String to = parts[0];
+ String omDbPrefix = OM_DB_NAME + "/";
+ if (to.startsWith(omDbPrefix)) {
+ to = to.substring(omDbPrefix.length());
+ }
Review Comment:
The hardcoded string concatenation should be extracted to a constant for
better maintainability and to avoid potential typos.
--
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]