hemantk-12 commented on code in PR #4525:
URL: https://github.com/apache/ozone/pull/4525#discussion_r1159031464


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java:
##########
@@ -210,5 +225,19 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
     }
     return omClientResponse;
   }
-  
+
+  /**
+   * Removes the snapshot from the SnapshotChainManager.
+   */
+  private void removeSnapshotInfoFromSnapshotChainManager(
+      SnapshotChainManager snapshotChainManager,
+      SnapshotInfo info
+  ) {
+    try {
+      snapshotChainManager.deleteSnapshot(info);
+    } catch (IOException exception) {
+      LOG.warn("Failed to remove snapshot: {} from SnapshotChainManager.",

Review Comment:
   The only case, it won't be able to delete snapshot is when 
`snapshotChainManager` is corrupted.
   
   I talked to snapshot team and agreed to throw exception in that scenario. 



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