hemantk-12 commented on code in PR #6024:
URL: https://github.com/apache/ozone/pull/6024#discussion_r1481955018
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:
##########
@@ -178,18 +203,12 @@ public ReferenceCounted<IOmMetadataReader, SnapshotCache>
get(String key, boolea
// when called from SDT (and some) if the snapshot is not active anymore.
if (!skipActiveCheck && !omSnapshotManager.isSnapshotStatus(key,
SNAPSHOT_ACTIVE)) {
// Ref count was incremented. Need to decrement on exception here.
- rcOmSnapshot.decrementRefCount();
+ rcOmSnapshot.close();
Review Comment:
Had a offline discussion, `close()` internal calls `decrementRefCount()`.
But I think `decrementRefCount()` is better to use from readability
perspective otherwise someone will have the same doubt I had.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:
##########
@@ -178,18 +203,12 @@ public ReferenceCounted<IOmMetadataReader, SnapshotCache>
get(String key, boolea
// when called from SDT (and some) if the snapshot is not active anymore.
if (!skipActiveCheck && !omSnapshotManager.isSnapshotStatus(key,
SNAPSHOT_ACTIVE)) {
// Ref count was incremented. Need to decrement on exception here.
- rcOmSnapshot.decrementRefCount();
+ rcOmSnapshot.close();
Review Comment:
Had a offline discussion, `close()` internal calls `decrementRefCount()`.
But I think `decrementRefCount()` is better to use from readability
perspective otherwise someone may have the same doubt I had.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]