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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -5416,6 +5418,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:
   @sarvekshayr Thanks for the suggestion.
   
   At this point in resolveBucketLink, volumeName and bucketName are the 
current hop that failed, not necessarily the bucket the user called or the 
final source. With chained links, putting those names in the message can look 
like a direct get against the wrong volume/bucket and confuse operators.
   
   We kept the message generic on purpose (Cannot follow bucket link: linked 
source bucket does not exist): the failure should read as “could not follow the 
link,” not as a specific missing object name. Enriching the message with the 
original link target or true source would mean carrying extra context through 
the recursion (or more bookkeeping in the catch path) for little gain here—the 
common case is simply a dangling link, and the generic text is enough for that.
   
   So I’d prefer to stay with the generic message for this Jira rather than add 
more state just for error-string formatting.



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