Skip to content
Merged
Changes from 1 commit
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 @@ -173,13 +173,18 @@ public BackgroundTaskResult call() throws InterruptedException {
// another.
if (nextSnapshot != null &&
nextSnapshot.getSnapshotStatus() != SnapshotInfo.SnapshotStatus.SNAPSHOT_ACTIVE) {
LOG.info("Skipping Snapshot Deletion processing for : {}", snapInfo.getTableKey());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Move line 170 to before line 167.
  2. Add a log statement for lines 167-169 with the message Skipping Snapshot Deletion processing because the snapshot is not active or DB changes are not flushed: {}?
  3. Change the message to Skipping Snapshot Deletion processing for : {} because the next snapshot is DELETED..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hemantk-12,
2. Should this log be Skipping Snapshot Deletion processing because the snapshot is active or DB changes are not flushed: {}? and do we want to add this even as a debug log? Wouldn't it be cleaner for SnapshotDeletingService to log the progress of snapshots marked for deletion only? In which case, 1. might also not be necessary.

Otherwise, everytime SnapshotDeletingService runs we will see logs for all snapshots, most of which will say "not deleting this snapshot because it is active" which may not indicate anything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can add debug logs for points 2 and 3.

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