Skip to content

Commit 0a9df7b

Browse files
authored
HDDS-14015. Delete older snapshot checkpoint dirs under the snapshot content lock (#9380)
1 parent 76b146c commit 0a9df7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/defrag/SnapshotDefragService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,10 @@ private boolean checkAndDefragSnapshot(SnapshotChainManager chainManager, UUID s
613613
checkpointMetadataManager = null;
614614
// Switch the snapshot DB location to the new version.
615615
previousVersion = atomicSwitchSnapshotDB(snapshotId, checkpointLocation);
616+
omSnapshotManager.deleteSnapshotCheckpointDirectories(snapshotId, previousVersion);
616617
} finally {
617618
snapshotContentLocks.releaseLock();
618619
}
619-
omSnapshotManager.deleteSnapshotCheckpointDirectories(snapshotId, previousVersion);
620620
} finally {
621621
if (checkpointMetadataManager != null) {
622622
checkpointMetadataManager.close();

0 commit comments

Comments
 (0)