prashantpogde commented on code in PR #4419:
URL: https://github.com/apache/ozone/pull/4419#discussion_r1146799394


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshot.java:
##########
@@ -82,11 +91,30 @@ public OmSnapshot(KeyManager keyManager,
     this.bucketName = bucketName;
     this.volumeName = volumeName;
     this.omMetadataManager = keyManager.getMetadataManager();
+    this.snapshotDBKey = SnapshotInfo.getTableKey(
+        volumeName, bucketName, snapshotName);
+    this.activeOMMetadataManager = ozoneManager.getMetadataManager();
   }
 
+  /**
+   * Check snapshot status in active DB snapshotInfoTable.
+   * @throws IOException FileNotFoundException when snapshot is not active.
+   */
+  private void checkSnapshotStatus() throws IOException {
+    if (activeOMMetadataManager.getSnapshotInfoTable().get(snapshotDBKey)

Review Comment:
   +1, However do we ever need to create any metadata manager object for a 
deleted but not yet reclaimed snapshot ?



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