prashantpogde commented on code in PR #4946: URL: https://github.com/apache/ozone/pull/4946#discussion_r1237600999
########## hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java: ########## @@ -386,16 +389,30 @@ public static DBCheckpoint createOmSnapshotCheckpoint( omMetadataManager.getTableLock(OmMetadataManagerImpl.DELETED_TABLE) .writeLock().lock(); + boolean snapshotDirExist = false; + try { // Create DB checkpoint for snapshot - dbCheckpoint = store.getSnapshot(snapshotInfo.getCheckpointDirName()); - // Clean up active DB's deletedTable right after checkpoint is taken, - // with table write lock held - deleteKeysFromDelKeyTableInSnapshotScope(omMetadataManager, - snapshotInfo.getVolumeName(), snapshotInfo.getBucketName()); - // Clean up deletedDirectoryTable as well - deleteKeysFromDelDirTableInSnapshotScope(omMetadataManager, - snapshotInfo.getVolumeName(), snapshotInfo.getBucketName()); + String checkpointPrefix = store.getDbLocation().getName(); + Path snapshotDirPath = Paths.get(store.getSnapshotsParentDir(), + checkpointPrefix + snapshotInfo.getCheckpointDir()); + if (Files.exists(snapshotDirPath)) { + snapshotDirExist = true; + dbCheckpoint = new RocksDBCheckpoint(snapshotDirPath); + } else { + dbCheckpoint = store.getSnapshot(snapshotInfo.getCheckpointDirName()); Review Comment: In this path we setup checkpointCreationTimeTaken etc. on the 3 OM HA nodes, the creation time could differ, this should have come in the request. Can you check the other path ? cc : @hemantk-12 -- 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