HDDS-15392. Add OmKeyInfo and OmDirectoryInfo to snapshot diff codec registry.#10770
Open
SaketaChalamchala wants to merge 1 commit into
Open
HDDS-15392. Add OmKeyInfo and OmDirectoryInfo to snapshot diff codec registry.#10770SaketaChalamchala wants to merge 1 commit into
SaketaChalamchala wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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()) andOmDirectoryInfo(getCodec()) in OM’s snapshot-diffCodecRegistry. - 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()) |
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.
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