Sigma-Ma opened a new pull request, #8512:
URL: https://github.com/apache/hbase/pull/8512

   JIRA: https://issues.apache.org/jira/browse/HBASE-29984
   
   ### What changes were proposed in this pull request?
   
   This change updates `IncrementalBackupManager` to recursively collect 
archived WAL files under the old WAL directory instead of assuming that every 
direct child is a WAL file.
   
   It reuses `BackupUtils.getFiles` so that both the existing flat layout and 
the per-RegionServer directory layout enabled by 
`hbase.separate.oldlogdir.by.regionserver` are supported.
   
   A regression test is added to verify that an archived WAL stored under a 
RegionServer-specific directory is included in the incremental backup file list.
   
   ### Why are the changes needed?
   
   When `hbase.separate.oldlogdir.by.regionserver` is enabled, archived WALs 
are stored in RegionServer-specific subdirectories under the old WAL directory.
   
   The existing backup code uses `FileSystem.listStatus` and treats every 
direct child as a WAL file. It can therefore attempt to parse a directory as a 
WAL and fail during incremental backup log collection.
   
   Recursively collecting files supports both directory layouts without 
changing the existing WAL filtering behavior.
   
   ### How was this patch tested?
   
   Added `TestIncrementalBackupManager`, covering an archived WAL stored under 
a RegionServer-specific old WAL directory.
   
   The focused test can be run with:
   
   ```bash
   mvn -pl hbase-backup -am \
     -DskipITs \
     -Dtest=TestIncrementalBackupManager \
     -Dsurefire.failIfNoSpecifiedTests=false \
     test


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