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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -93,6 +93,11 @@ public static SnapshotInfo getSnapshotInfo(OzoneManager 
ozoneManager,
                                              SnapshotChainManager chainManager,
                                              UUID snapshotId) throws 
IOException {
     String tableKey = chainManager.getTableKey(snapshotId);
+    if (tableKey == null) {
+      LOG.error("Snapshot with ID: '{}' is not found.", snapshotId);
+      throw new OMException("Snapshot with ID: '" + snapshotId + "' is not 
found.",

Review Comment:
   UUID would be printed as a long string so I'd prefer the message itself to 
be in the front for slightly better readability
   
   ```suggestion
         LOG.error("Snapshot not found with UUID '{}'", snapshotId);
         throw new OMException("Snapshot not found with UUID '" + snapshotId + 
"'",
   ```



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to