sarvekshayr commented on code in PR #11368:
URL: https://github.com/apache/ozone/pull/11368#discussion_r4226984343


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -5494,6 +5496,13 @@ private OmBucketInfo resolveBucketLink(
       if (allowDanglingBuckets) {
         return null;
       }
+
+      if (!visited.isEmpty()
+          && (e.getResult() == VOLUME_NOT_FOUND || e.getResult() == 
BUCKET_NOT_FOUND)) {
+        throw new OMException(
+            "Cannot follow bucket link: linked source bucket does not exist",
+            BUCKET_NOT_FOUND);

Review Comment:
   nit:  Pass `e` as the cause in `OMException(String, Throwable, 
ResultCodes)`, this way OM logs would still show the original 
`VOLUME_NOT_FOUND` or `BUCKET_NOT_FOUND` cause.
   ```suggestion
           throw new OMException(
               "Cannot follow bucket link: linked source bucket does not 
exist", e, BUCKET_NOT_FOUND);
   ```



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