Skip to content

Commit

Permalink
Fix snapshot location regression in SNS messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattl-netflix committed May 5, 2023
1 parent e8aeded commit 219a269
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import com.netflix.priam.scheduler.TaskTimer;
import com.netflix.priam.utils.DateUtil;
import com.netflix.priam.utils.DateUtil.DateRange;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.List;
Expand Down Expand Up @@ -93,12 +95,17 @@ public void execute() throws Exception {
.filter(result -> result.getLastValidated().toInstant().isAfter(now))
.forEach(
result -> {
Path snapshotLocation = Paths.get(result.getSnapshotLocation());
String snapshotKey =
snapshotLocation
.subpath(1, snapshotLocation.getNameCount())
.toString();
logger.info(
"Sending {} message for backup: {}",
AbstractBackupPath.BackupFileType.SNAPSHOT_VERIFIED,
result.getSnapshotLocation());
snapshotKey);
backupNotificationMgr.notify(
result.getSnapshotLocation(), result.getStart().toInstant());
snapshotKey, result.getStart().toInstant());
});

if (verifiedBackups.isEmpty()) {
Expand Down

0 comments on commit 219a269

Please sign in to comment.