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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java:
##########
@@ -215,5 +230,21 @@ 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.",
+          info, exception);
+      throw new IllegalStateException("Snapshot chain manager is corrupted.",

Review Comment:
   Discussed offline and it is better to not throw exception because we lose 
the actual error in snapshot creation.



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