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


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java:
##########
@@ -370,13 +376,56 @@ protected void deleteBulkLoadDirectory() throws 
IOException {
     }
   }
 
-  protected void convertWALsToHFiles() throws IOException {
-    // get incremental backup file list and prepare parameters for DistCp
-    List<String> incrBackupFileList = backupInfo.getIncrBackupFileList();
+  protected Set<String> convertWALsToHFiles() throws IOException {
+    Set<String> backupFiles = new 
HashSet<>(backupInfo.getIncrBackupFileList());
+    // filter missing files out (they have been copied by previous backups)
+    backupFiles = filterMissingFiles(backupFiles);
+    int attempt = 1;
+    int maxAttempts =
+      conf.getInt(CONVERT_TO_WAL_TO_HFILES_ATTEMPTS_KEY, 
CONVERT_TO_WAL_TO_HFILES_ATTEMPTS_DEFAULT);
+
+    while (attempt <= maxAttempts) {

Review Comment:
   We attempt to read from the archived file in that case. See the behavior 
[here](https://github.com/apache/hbase/blob/3500d6f2e1735c1c4ed5cff86860f8509753a3b3/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java#L256).
 So that edge case is accounted for. However, we fail if the WAL was archived 
before hitting this code path, as we're attempting to list all files under the 
given (now archived) directory.



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to