Skip to content

HBASE-30322: Persist all fields of BackupInfo - #8542

Open
charlesconnell wants to merge 2 commits into
apache:masterfrom
HubSpot:HBASE-30322/backup-info-proto
Open

HBASE-30322: Persist all fields of BackupInfo#8542
charlesconnell wants to merge 2 commits into
apache:masterfrom
HubSpot:HBASE-30322/backup-info-proto

Conversation

@charlesconnell

@charlesconnell charlesconnell commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

The class BackupInfo has a pair of methods, toProtosBackupInfo() and fromProto(), 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:

  • totalBytesCopied
  • noChecksumVerify
  • incrBackupFileList
  • incrTimestampMap

In particular I ran into a problem when incrBackupFileList was missing after getting a BackupInfo from BackupAdmin.

@charlesconnell charlesconnell changed the title Persist all fields of BackupInfo HBASE-30322: Persist all fields of BackupInfo Aug 8, 2026
@charlesconnell
charlesconnell requested a review from ndimiduk August 8, 2026 12:35
@Apache9
Apache9 requested a balanced review from Copilot August 8, 2026 14:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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(

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.

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

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.

2 participants