smengcl commented on code in PR #4249:
URL: https://github.com/apache/ozone/pull/4249#discussion_r1113314661


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -94,6 +95,10 @@ public OmSnapshot load(@Nonnull String snapshotTableKey)
         // see if the snapshot exists
         snapshotInfo = getSnapshotInfo(snapshotTableKey);
 
+        boolean isSnapshotInCache =
+            ozoneManager.getMetadataManager().getSnapshotInfoTable()
+                .getCacheValue(new CacheKey<>(snapshotTableKey)) != null;

Review Comment:
   nvm. I checked that this case is also handled by the `null` check.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -94,6 +95,10 @@ public OmSnapshot load(@Nonnull String snapshotTableKey)
         // see if the snapshot exists
         snapshotInfo = getSnapshotInfo(snapshotTableKey);
 
+        boolean isSnapshotInCache =
+            ozoneManager.getMetadataManager().getSnapshotInfoTable()
+                .getCacheValue(new CacheKey<>(snapshotTableKey)) != null;

Review Comment:
   nvm. I checked that this case is also covered by the `null` check.



-- 
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]

Reply via email to