hgromer commented on code in PR #8694:
URL: https://github.com/apache/hbase/pull/8694#discussion_r4094566361
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/FullTableBackupClient.java:
##########
@@ -248,6 +258,54 @@ private void performSnapshots(Admin admin) throws
IOException {
}
}
+ /**
+ * Scan all WAL files to find offline/decommissioned hosts and record their
max WAL timestamps in
+ * newTimestamps. This ensures subsequent incremental backups won't
re-include WALs already covered
+ * by this full backup's snapshot.
+ */
+ private void adjustTimestampsForOfflineHosts(Map<String, Long>
previousLogRollsByHost,
+ Map<String, Long> latestLogRollsByHost) throws IOException {
+ Path walRootDir = CommonFSUtils.getWALRootDir(conf);
+ Path logDir = new Path(walRootDir, HConstants.HREGION_LOGDIR_NAME);
+ Path oldLogDir = new Path(walRootDir, HConstants.HREGION_OLDLOGDIR_NAME);
+ FileSystem fs = walRootDir.getFileSystem(conf);
+
+ List<FileStatus> allLogs = new ArrayList<>();
+ for (FileStatus hostLogDir : fs.listStatus(logDir)) {
Review Comment:
yeah good call, fixing
--
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]