Skip to content

Commit

Permalink
while creating manifest, search only for ancestors insteadd of all of…
Browse files Browse the repository at this point in the history
… history (#3246)

Co-authored-by: Mallikarjun <mallikvarjun@gmail.com>
  • Loading branch information
rda3mon and rda3mon authored May 12, 2021
1 parent cdac8fd commit b65733c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ public ArrayList<BackupImage> getAncestors(BackupInfo backupInfo) throws IOExcep
.withRootDir(backup.getBackupRootDir()).withTableList(backup.getTableNames())
.withStartTime(backup.getStartTs()).withCompleteTime(backup.getCompleteTs()).build();

// Only direct ancestors for a backup are required and not entire history of backup for this
// table resulting in verifying all of the previous backups which is unnecessary and backup
// paths need not be valid beyond the lifetime of a backup.
//
// RootDir is way of grouping a single backup including one full and many incremental backups
if (!image.getRootDir().equals(backupInfo.getBackupRootDir())) {
continue;
}

// add the full backup image as an ancestor until the last incremental backup
if (backup.getType().equals(BackupType.FULL)) {
// check the backup image coverage, if previous image could be covered by the newer ones,
Expand Down

0 comments on commit b65733c

Please sign in to comment.