vinayakphegde commented on code in PR #6847:
URL: https://github.com/apache/hbase/pull/6847#discussion_r2021533089


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java:
##########
@@ -853,6 +869,188 @@ protected void printUsage() {
     }
   }
 
+  /**
+   * The {@code CleanupCommand} class is responsible for removing Write-Ahead 
Log (WAL) and
+   * bulk-loaded files that are no longer needed for Point-in-Time Recovery 
(PITR).
+   * <p>
+   * The cleanup process follows these steps:
+   * <ol>
+   * <li>Identify the oldest full backup and its start timestamp.</li>
+   * <li>Delete WAL files older than this timestamp, as they are no longer 
usable for PITR with any
+   * backup.</li>
+   * </ol>

Review Comment:
   Thanks, @rmdmattingly and @anmolnar.
   
   Okay, we can incorporate this cleanup process into the delete command itself.
   
   Currently, the delete command is used to remove both full and incremental 
backups. We have now introduced a new validation for PITR-Critical Backup 
Deletion. Please check the PR here: https://github.com/apache/hbase/pull/6848 
and review it.
   
   I will also add this cleanup logic at the end of the delete process to 
remove any WALs that can be deleted (which were previously retained due to this 
backup). How does that sound?



-- 
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