hgromer commented on code in PR #7523:
URL: https://github.com/apache/hbase/pull/7523#discussion_r2594066946


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java:
##########
@@ -153,19 +159,34 @@ public Iterable<FileStatus> 
getDeletableFiles(Iterable<FileStatus> files) {
       return files;
     }
 
-    Map<Address, Long> serverToPreservationBoundaryTs;
+    long oldestStartCode = Long.MAX_VALUE;
     try {
-      try (BackupManager backupManager = new BackupManager(conn, getConf())) {
-        serverToPreservationBoundaryTs =
-          serverToPreservationBoundaryTs(backupManager.getBackupHistory(true));
+      try (BackupSystemTable sysTable = new BackupSystemTable(conn)) {
+        Set<String> roots = sysTable.getBackupHistory(true).stream()
+          .map(BackupInfo::getBackupRootDir).collect(Collectors.toSet());
+        if (roots.isEmpty()) {
+          LOG.info("No backups found, can delete all files");

Review Comment:
   👍 



##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java:
##########


Review Comment:
   Ah thank you good catch



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to