You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2021/05/12 23:43:55 UTC

[hbase] branch master updated: while creating manifest, search only for ancestors insteadd of all of history (#3246)

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new b65733c  while creating manifest, search only for ancestors insteadd of all of history (#3246)
b65733c is described below

commit b65733c093171315f170f4e702d867bb5e5dee22
Author: Mallikarjun <ma...@gmail.com>
AuthorDate: Thu May 13 05:13:17 2021 +0530

    while creating manifest, search only for ancestors insteadd of all of history (#3246)
    
    Co-authored-by: Mallikarjun <ma...@gmail.com>
---
 .../java/org/apache/hadoop/hbase/backup/impl/BackupManager.java  | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java
index e1fb73a..861b79a 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java
@@ -295,6 +295,15 @@ public class BackupManager implements Closeable {
           .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,