You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ndimiduk (via GitHub)" <gi...@apache.org> on 2026/02/13 11:19:43 UTC
Re: [PR] HBASE-29895 BackupBoundaries global coverage can allow premature WAL deletion when backup roots have different host coverage [hbase]
ndimiduk commented on code in PR #7746:
URL: https://github.com/apache/hbase/pull/7746#discussion_r2803702378
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupBoundaries.java:
##########
@@ -38,22 +38,35 @@ public class BackupBoundaries {
private static final BackupBoundaries EMPTY_BOUNDARIES =
new BackupBoundaries(Collections.emptyMap(), Long.MAX_VALUE);
- // This map tracks, for every RegionServer, the least recent (= oldest / lowest timestamp)
- // inclusion in any backup. In other words, it is the timestamp boundary up to which all backup
- // roots have included the WAL in their backup.
- private final Map<Address, Long> boundaries;
+ // Tracks WAL cleanup boundaries separately for each backup root to ensure WALs are only deleted
+ // when ALL backup roots no longer need them. The outer map key is the backup ID of the most
+ // recent backup from each backup root. For each backup root, the inner map stores the WAL
+ // timestamp boundary per RegionServer (the oldest WAL timestamp included in that backup root's
+ // most recent backup). A WAL file can only be deleted if it's older than the boundary for ALL
+ // backup roots, protecting WALs needed by any backup root even when other roots have already
+ // backed up that host at a later timestamp.
+ private final Map<String, Map<Address, Long>> boundaries;
Review Comment:
It would be nice if BackupID had its own type. That's probably a larger change.
--
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-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org