Incremental backups fail on archived bulkloaded HFiles (not yet upstream)#201
Merged
hgromer merged 3 commits intohubspot-2.6from Sep 23, 2025
Merged
Conversation
ndimiduk
reviewed
Sep 23, 2025
| archiveFiles.addAll(newlyArchived); | ||
| for (String file : newlyArchived) { | ||
| String archivedFile = file.substring(rootDir.length() + 1); | ||
| archivedFile = new Path(HFileArchiveUtil.getArchivePath(conf), archivedFile).toString(); |
Collaborator
There was a problem hiding this comment.
Will it be helpful to log debug the tracking of the files from one directory to the other?
| archiveFiles.addAll(newlyArchived); | ||
| for (String file : newlyArchived) { | ||
| String archivedFile = file.substring(rootDir.length() + 1); | ||
| archivedFile = new Path(HFileArchiveUtil.getArchivePath(conf), archivedFile).toString(); |
Collaborator
There was a problem hiding this comment.
Should you confirm that this new file path exists before handing it off to the next step? Maybe complain loudly if the file doesn't exist in the new or old location?
Just thinking about how this might silently drop data due to a path manipulation bug.
Collaborator
Author
There was a problem hiding this comment.
We won't drop data b/c the call to backup a file that doesn't exist will fail, but I can probably just add a check here to fast fail. Thanks
sidkhillon
pushed a commit
that referenced
this pull request
Sep 25, 2025
charlesconnell
pushed a commit
that referenced
this pull request
Oct 22, 2025
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.
At the moment, when we update the archive list, we're not adding the archived files, we're adding the original bulkloaded HFiles. This means that when we go to re-try loading the bulkloaded files, it'll just fail again.
This PR converts the original bulkloaded HFiles that no longer exist into archived HFiles, so they can be backed up correctly.