Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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<OmSnapshot> snapshot = omSnapshotManager.getSnapshot(
snapInfo.getVolumeName(), snapInfo.getBucketName(), snapInfo.getName())) {
Expand Down