diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java index 7fabe79a2af..8b28416f4e8 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java @@ -165,6 +165,8 @@ public BackgroundTaskResult call() throws InterruptedException { while (iterator.hasNext() && snapshotLimit > 0 && remaining > 0) { SnapshotInfo snapInfo = SnapshotUtils.getSnapshotInfo(ozoneManager, chainManager, iterator.next()); if (shouldIgnoreSnapshot(snapInfo)) { + LOG.debug("Skipping Snapshot Deletion processing because " + + "the snapshot is active or DB changes are not flushed: {}", snapInfo.getTableKey()); continue; } LOG.info("Started Snapshot Deletion Processing for snapshot : {}", snapInfo.getTableKey()); @@ -173,13 +175,19 @@ public BackgroundTaskResult call() throws InterruptedException { // another. if (nextSnapshot != null && nextSnapshot.getSnapshotStatus() != SnapshotInfo.SnapshotStatus.SNAPSHOT_ACTIVE) { + LOG.info("Skipping Snapshot Deletion processing for : {} because the next snapshot is DELETED.", + snapInfo.getTableKey()); continue; } // nextSnapshot = null means entries would be moved to AOS. if (nextSnapshot == null) { + LOG.info("Snapshot: {} entries will be moved to AOS.", snapInfo.getTableKey()); waitForKeyDeletingService(); waitForDirDeletingService(); + } else { + LOG.info("Snapshot: {} entries will be moved to next active snapshot: {}", + snapInfo.getTableKey(), nextSnapshot.getTableKey()); } try (ReferenceCounted snapshot = omSnapshotManager.getSnapshot( snapInfo.getVolumeName(), snapInfo.getBucketName(), snapInfo.getName())) {