Skip to content

HDDS-15392. Add OmKeyInfo and OmDirectoryInfo to snapshot diff codec registry.#10770

Open
SaketaChalamchala wants to merge 1 commit into
apache:masterfrom
SaketaChalamchala:HDDS-15392
Open

HDDS-15392. Add OmKeyInfo and OmDirectoryInfo to snapshot diff codec registry.#10770
SaketaChalamchala wants to merge 1 commit into
apache:masterfrom
SaketaChalamchala:HDDS-15392

Conversation

@SaketaChalamchala

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Developed with the help of Cursor AI.

This PR is intended as the foundation for a more efficient snapshot diff (HDDS-9154).

Added OmKeyInfo and OmDirectoryInfo to snapshot diff codec registry to prevent IllegalStateExceptions in the optimized snapshot diff paths.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15392

How was this patch tested?

N/A

@jojochuang jojochuang requested a review from Copilot July 15, 2026 05:09
@jojochuang jojochuang added AI-gen snapshot https://issues.apache.org/jira/browse/HDDS-6517 labels Jul 15, 2026

Copilot AI 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.

Pull request overview

This PR extends the snapshot diff CodecRegistry used by OM’s snapshot-diff RocksDB utilities so it can encode/decode OmKeyInfo and OmDirectoryInfo, avoiding runtime IllegalStateExceptions in optimized snapshot diff flows (foundation work for HDDS-9154 / HDDS-15392).

Changes:

  • Register OmKeyInfo (getKeyTableCodec()) and OmDirectoryInfo (getCodec()) in OM’s snapshot-diff CodecRegistry.
  • Mirror the same codec registrations in TestSnapshotDiffManager’s test registry initialization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java Adds OmKeyInfo and OmDirectoryInfo codecs to the snapshot-diff registry created for snapshot diff DB usage.
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java Updates test codec registry initialization to include the same codecs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 223 to +227
codecRegistry = CodecRegistry.newBuilder()
.addCodec(DiffReportEntry.class, getDiffReportEntryCodec())
.addCodec(SnapshotDiffJob.class, SnapshotDiffJob.codec())
.addCodec(OmKeyInfo.class, OmKeyInfo.getKeyTableCodec())
.addCodec(OmDirectoryInfo.class, OmDirectoryInfo.getCodec())
@jojochuang jojochuang marked this pull request as ready for review July 16, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-gen snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants