HBASE-30322: Persist all fields of BackupInfo - #8542
Open
charlesconnell wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Persists previously omitted BackupInfo fields through protobuf serialization.
Changes:
- Adds protobuf fields for incremental backup metadata.
- Updates serialization/deserialization logic.
- Adds round-trip tests and adjusts WAL target reconstruction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Backup.proto |
Defines the additional persisted fields. |
BackupInfo.java |
Serializes and restores the fields. |
TestBackupInfoSerialization.java |
Tests serialization behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+531
to
+535
| // Only incremental backups have a WAL target directory. Setting this unconditionally would | ||
| // hand FULL backups a non-null path that never existed, which cleanupHLogDir() would then | ||
| // try to delete. | ||
| if (BackupType.valueOf(proto.getBackupType().name()) == BackupType.INCREMENTAL) { | ||
| context.setHLogTargetDir( |
Contributor
Author
There was a problem hiding this comment.
While I don't believe this is true, in the interest of keeping this PR as easy to understand as possible, I'm going to revert this line
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.
The class BackupInfo has a pair of methods,
toProtosBackupInfo()andfromProto(), so you can convert the POJO BackupInfo to and from the protobuf version. These methods do not handle all fields, so some information is lost. They do not handle:totalBytesCopiednoChecksumVerifyincrBackupFileListincrTimestampMapIn particular I ran into a problem when
incrBackupFileListwas missing after getting a BackupInfo from BackupAdmin.