while creating manifest, search only for ancestors insteadd of all of history (#3246)

Co-authored-by: Mallikarjun <mallikvarjun@gmail.com>
This commit is contained in:
Mallikarjun 2021-05-13 05:13:17 +05:30 committed by GitHub
parent cdac8fdb7c
commit b65733c093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -295,6 +295,15 @@ public class BackupManager implements Closeable {
.withRootDir(backup.getBackupRootDir()).withTableList(backup.getTableNames()) .withRootDir(backup.getBackupRootDir()).withTableList(backup.getTableNames())
.withStartTime(backup.getStartTs()).withCompleteTime(backup.getCompleteTs()).build(); .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 // add the full backup image as an ancestor until the last incremental backup
if (backup.getType().equals(BackupType.FULL)) { if (backup.getType().equals(BackupType.FULL)) {
// check the backup image coverage, if previous image could be covered by the newer ones, // check the backup image coverage, if previous image could be covered by the newer ones,