jojochuang commented on code in PR #8678: URL: https://github.com/apache/ozone/pull/8678#discussion_r2192757383
########## hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java: ########## @@ -769,6 +770,15 @@ public static String getSnapshotPath(OzoneConfiguration conf, OM_DB_NAME + checkpointDirName; } + public static String extractSnapshotIDFromCheckpointDirName(String snapshotPath) { + // Find "om.db-" in the path and return whatever comes after + int index = snapshotPath.lastIndexOf(OM_DB_NAME); + if (index == -1 || index + OM_DB_NAME.length() >= snapshotPath.length()) { Review Comment: ```suggestion if (index == -1 || index + OM_DB_NAME.length() + OM_SNAPSHOT_SEPARATOR.length() >= snapshotPath.length()) { ``` -- 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