Copilot commented on code in PR #7239:
URL: https://github.com/apache/hbase/pull/7239#discussion_r2299324289


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java:
##########
@@ -1058,6 +1069,7 @@ void deleteOldWALFiles(Configuration conf, String 
backupWalDir, long cutoffTime)
           if (dayStart + ONE_DAY_IN_MILLISECONDS - 1 < cutoffTime) {
             System.out.println("Deleting outdated WAL directory: " + dirPath);
             fs.delete(dirPath, true);
+            fs.delete(new Path(bulkloadDir, dirName), true);

Review Comment:
   The bulk-load directory deletion is executed unconditionally outside the 
cutoff time check. This should be moved inside the if condition on line 1069 to 
ensure it only deletes outdated directories, matching the WAL deletion behavior.



##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java:
##########
@@ -1058,6 +1069,7 @@ void deleteOldWALFiles(Configuration conf, String 
backupWalDir, long cutoffTime)
           if (dayStart + ONE_DAY_IN_MILLISECONDS - 1 < cutoffTime) {
             System.out.println("Deleting outdated WAL directory: " + dirPath);
             fs.delete(dirPath, true);
+            fs.delete(new Path(bulkloadDir, dirName), true);

Review Comment:
   [nitpick] Consider adding a corresponding print statement for bulk-load 
directory deletion, similar to line 1070 for WAL directories, to maintain 
consistent logging behavior.
   ```suggestion
               Path bulkloadPath = new Path(bulkloadDir, dirName);
               System.out.println("Deleting corresponding bulk-load directory: 
" + bulkloadPath);
               fs.delete(bulkloadPath, true);
   ```



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