-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-8166. [Snapshot] Add a config to enable or disable Ozone snapshot feature on OM #4642
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
Conversation
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
…iesPurgeRequestWithFSO#validateAndUpdateCache -- can lead to inconsistency when OM is recovering from Ratis log if skipped.
…is null; findbugs.
…ment and code clean up.
…napshotManager.checkForSnapshot`; Just disables `snapshotDiffCleanupService` for now.
…hotManager#checkForSnapshot` to return active DB OmMetadataReader instance.
Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java
prashantpogde
left a comment
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.
LGTM
errose28
left a comment
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.
LGTM. @smengcl @prashantpogde can you file a follow up jira to define the long term story around this config flag? We need to decide if moving it from on to off and back to on is supported, and add corresponding tests or docs for whatever decision is made.
|
|
Thanks @hemantk-12 @prashantpogde @errose28 for reviewing this. |
|
We may not want to invest too much time in a long-term story, this flag is just for short-term use until the snapshot feature is fully ready and stable. |
What changes were proposed in this pull request?
Add an option to control whether Ozone filesystem snapshot feature is enabled or not on the OM side.
a) All snapshot related OM background tasks shall not run
b) Snapshot requests (CreateSnapshot / DeleteSnapshot) are gracefully rejected (
OMExceptionwithFEATURE_NOT_ENABLED), achieved by a new AspectJ annotation implementation.There is a follow-up JIRA to refactor
OmSnapshotManagerconstructor to further reduce the initialization done when snapshot feature is disabled: HDDS-8529.TODO
omSnapshotManagernull checks added in this PR now that we can't really not initialize it.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8166
How was this patch tested?
false