-
Notifications
You must be signed in to change notification settings - Fork 509
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-10262. Encapsulate SnapshotCache inside OmSnapshotManager #6135
Conversation
@hemantk-12 please take a look at this PR |
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.
Thanks @Cyrill for the improvements.
Overall looks good to me. Left some inline comment.
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java
Show resolved
Hide resolved
@smengcl can you please also take a look? |
# Conflicts: # hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyDeletingService.java
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java
Outdated
Show resolved
Hide resolved
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 and @aswinshakil, please take a look as well.
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.
Thanks @Cyrill for this effort of refactoring. Most of the changes looks good to me. I have a comment inline.
/** | ||
* Parent instance whose callback will be triggered upon this RC closure. | ||
*/ | ||
private final U parentWithCallback; |
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.
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.
I'm fine with leaving the unused field, though I strongly believe the callback should not be a part of the class generics.
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.
Returned back the field.
Are we okay to merge this pr? Who should I ask to do that? |
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.
Thanks @Cyrill for the refactoring and clean up.
HDDS-10262. Encapsulate SnapshotCache inside OmSnapshotManager
Changes made:
SnapshotCache
is now used purely inOmSnapshotManager
and not exposed outside.Previous calls to
SnapshotCache
are now changed toOmSnapshotManager
.Explicit parameter "
skipActiveCheck
" was removed, active state check is done implicitly.Also changed the generics in snapshot's ReferenceCounted returned value to get rid of type casts all over the codebase.
Removed unused parameter from ReferenceCounted class.
Reasoning
SnapshotCache
is now hidden from the world and any further refactoring to it should be easier.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10262
How was this patch tested?
Existing unit tests. There was no new functionality added.