HDDS-10262. Encapsulate SnapshotCache inside OmSnapshotManager#6135
HDDS-10262. Encapsulate SnapshotCache inside OmSnapshotManager#6135hemantk-12 merged 6 commits intoapache:masterfrom
Conversation
|
@hemantk-12 please take a look at this PR |
hemantk-12
left a comment
There was a problem hiding this comment.
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.
LGTM.
@smengcl and @aswinshakil, please take a look as well.
aswinshakil
left a comment
There was a problem hiding this comment.
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.
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.
Returned back the field.
|
Are we okay to merge this pr? Who should I ask to do that? |
hemantk-12
left a comment
There was a problem hiding this comment.
Thanks @Cyrill for the refactoring and clean up.
HDDS-10262. Encapsulate SnapshotCache inside OmSnapshotManager
Changes made:
SnapshotCacheis now used purely inOmSnapshotManagerand not exposed outside.Previous calls to
SnapshotCacheare 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
SnapshotCacheis 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.