Skip to content

HBASE-30371: Point-In-Time Restore is trying to find .backup.manifest file in the .tmp directory - #8638

Merged
anmolnar merged 5 commits into
apache:masterfrom
kgeisz:HBASE-30371-pitr-expecting-backup-manifest-in-tmp-dir
Sep 15, 2026
Merged

anmolnar merged 5 commits into
apache:masterfrom
kgeisz:HBASE-30371-pitr-expecting-backup-manifest-in-tmp-dir

Conversation

@kgeisz

@kgeisz kgeisz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/HBASE-30371

AI Usage

The unit test in the pull request was generated with Claude Opus 4.6

Summary

This pull request adds an if block to HBackupFileSystem that allows the .tmp directory to be skipped over when each backup root subdirectory is searched for its .backup.manifest file.

Before this fix, an error message would be logged during a Point-In-Time Restore saying the backup manifest could not be found in .tmp. The .tmp directory is not an actual backup directory, so it should not permanently hold this type of file to begin with.

Comment on lines +164 to +167
if (HBASE_TEMP_DIRECTORY.equals(backupId)) {
continue;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why then this would find a path under hbase temp?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question. I'm looking into this. Based on what I've seen so far, the backup_XXXX directory within backupRoot/.tmp is getting deleted, but not the .tmp dir itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like only the bulkoad directory (backupRoot/.tmp/backup_XXXX) was getting deleted when an incremental backup finished:
https://github.com/apache/hbase/blob/master/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java#L427

I added a new commit that deletes backupRoot/.tmp instead. Should we still have .tmp get skipped over in the code here as well as a safeguard?

cc. @ankitsol

@anmolnar anmolnar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

… file in the .tmp directory

Change-Id: Ic09ed49bb0a713e323e291abe60fcc90cd1f1c91
Change-Id: I133a15a7fbd154af32ffd4572d024aaa269737f7
Change-Id: Iea0d82c96acef6abbb59b85f69aac49fcf7d469d
…tors()

Change-Id: Ibb0d3c14ba191086e1df85e2488b43a56e107f5b
Change-Id: I916de565425a4dcce38f74f4da700c8c71d2b834
@kgeisz
kgeisz force-pushed the HBASE-30371-pitr-expecting-backup-manifest-in-tmp-dir branch from 1ac1806 to 0fe5d25 Compare September 14, 2026 21:35
@ankitsol

Copy link
Copy Markdown
Contributor

LGTM

@anmolnar
anmolnar merged commit 8f3235f into apache:master Sep 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants