Fix an issue with duplicated backups of decommissioned host WAL files - #228
Merged
Conversation
krconv
commented
Dec 15, 2025
| long logTs = BackupUtils.getCreationTime(logPath); | ||
| Long existingTs = newestTimestamps.get(logHost); | ||
| if (existingTs == null || logTs > existingTs) { | ||
| newestTimestamps.put(logHost, logTs); |
Author
There was a problem hiding this comment.
newestTimestamps is a collection of the last timestamps that will be included in this backup. When the backup finishes, these are stored in the backup table, and will be used when the next backup runs as the lower-bound (exclusive) for WAL files to replay
hgromer
reviewed
Dec 15, 2025
| FileSystem fs = walRootDir.getFileSystem(conf); | ||
| if (fs.exists(oldLogDir)) { | ||
| for (FileStatus oldlog : fs.listStatus(oldLogDir)) { | ||
| String host = BackupUtils.parseHostFromOldLog(oldlog.getPath()); |
Collaborator
There was a problem hiding this comment.
Mind if we also filter out meta WAL files? AbstractFSWALProvider.isMetaFile(p)
hgromer
approved these changes
Dec 15, 2025
hgromer
left a comment
Collaborator
There was a problem hiding this comment.
Neat. This change is applied to the client. So just need to deploy HBDR in orion once this has built
krconv
force-pushed
the
kodey-fix-backup-logs
branch
from
December 15, 2025 19:32
c504349 to
129ce93
Compare
charlesconnell
pushed a commit
that referenced
this pull request
Jul 14, 2026
…#228) * Fix an issue with duplicated backups of inactive host WAL files * Skip meta region WAL files
charlesconnell
pushed a commit
that referenced
this pull request
Jul 15, 2026
…#228) * Fix an issue with duplicated backups of inactive host WAL files * Skip meta region WAL files
charlesconnell
pushed a commit
that referenced
this pull request
Aug 4, 2026
…#228) * Fix an issue with duplicated backups of inactive host WAL files * Skip meta region WAL files
charlesconnell
pushed a commit
that referenced
this pull request
Aug 4, 2026
…#228) * Fix an issue with duplicated backups of inactive host WAL files * Skip meta region WAL files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #227 fixed the issue with WALs from decommissioned RegionServers not being included in backups, we found that there is another problem with this logic: WALs that are replayed and included in an incremental backup cannot be replayed again, because doing so effectively replays the edits out of order. In this case, a compaction can remove a tombstone that was applied after the original edit, and replaying the edit again will cause the cells to incorrectly re-appear.