-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-6856. HA aware reads from Snapshots #7988
Open
ivandika3
wants to merge
11
commits into
apache:master
Choose a base branch
from
ivandika3:HDDS-6856
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
peterxcli
reviewed
Mar 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, feel free to take a look and see if they make sense. Thanks!
...main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
Outdated
Show resolved
Hide resolved
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?
This adds a support for Ozone client to be able to do read-only snapshot operations (GetSnapshotInfo, ListSnapshots, SnapshotDiff, ListSnapshotDiffJobs) from non-leader OM.
For example, currently Snapdiff request will always go to the current OM leader. The leader will start a Snapdiff job if it does not exist yet and once it's finished, the user can rerun the snapdiff command again to receive the snapshot diffs returned by the Snapdiff job. However, if there is a OM leader change and another snapshot diff is called, the new OM leader needs to start the Snapdiff job again and the client will receive that the snapdiff is not ready yet, although it was ready at the previous leader. Furthermore, additional snapdiff job also adds some overhead.
This adds the following features
SingleOMFailoverProxyProviderBase
omNodeId
proto field which if set means that the OM request is intended for the particular OM nodeA possible usage would be to implement asynchronous bucket replication using bucket snapshot and snapdiffs similar to Cloudera Replication Manager (https://docs.cloudera.com/replication-manager/1.5.4/replication-policies/topics/rm-pvce-understand-ozone-replication-policy.html) mentioned in https://issues.apache.org/jira/browse/HDDS-12307. Since asynchronous replication does not require the most up-to-date key information, we can use OM listener (#7262) to generate snapdiff jobs required for the incremental snapshot. This way, the OM leader does not need to handle the replication related requests.
In the future, we can address https://issues.apache.org/jira/browse/HDDS-9666 to support reading keys in a snapshot from non-leader OM.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6856
How was this patch tested?
Unit test (proxy provider implementation), integration test (Ozone client), and acceptance test (Ozone shell, I moved the snapshot shell tests to be under ozone-ha environment).
Clean CI: https://github.com/ivandika3/ozone/actions/runs/13590426911