Repository navigation
HDDS-13066. Return a clear bucket-link error when the linked source does not exist - #11368
Open
rajeshkumarchandolu wants to merge 9 commits into
Open
rajeshkumarchandolu wants to merge 9 commits into
rajeshkumarchandolu wants to merge 9 commits into
Conversation
rajeshkumarchandolu
marked this pull request as draft
September 30, 2026 06:24
rajeshkumarchandolu
marked this pull request as ready for review
October 6, 2026 08:32
sarvekshayr
reviewed
Oct 6, 2026
sarvekshayr
left a comment
Contributor
There was a problem hiding this comment.
Thanks @rajeshkumarchandolu for working on this. Please find the below inline comments.
Contributor
There was a problem hiding this comment.
Thanks @rajeshkumarchandolu . few minor comments below.
sarvekshayr
reviewed
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
When a client strictly follows a bucket link (for example
ozone sh key liston a link bucket) and the linked source volume or bucket does not exist, Ozone previously often returnedVOLUME_NOT_FOUND, which is misleading because the link bucket itself may exist on a valid target volume. This change remaps that failure to a generic bucket-link message so operators see that the problem is a broken link target, not a missing volume on a direct lookup.The implementation adds a single catch in private
OzoneManager.resolveBucketLink: after at least one link hop has been recorded invisited, if resolution fails withVOLUME_NOT_FOUNDorBUCKET_NOT_FOUND, OM throwsBUCKET_NOT_FOUNDwith messageCannot follow bucket link: linked source bucket does not exist. Direct lookups (no link hop) and dangling-link create/metadata paths are unchanged. No newResultCodesor protoStatusvalues are introduced.Coverage: two unit tests in
TestBucketManagerImpl(resolveBucketLinkandlistKeys), and a new case inlinks.robotfor a link to a non-existent source volume.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13066
How was this patch tested?
mvn -pl :ozone-manager test -Dtest=TestBucketManagerImpl#testResolveBucketLinkMissingSourceVolume,TestBucketManagerImpl#testListKeysOnLinkWithMissingSourceVolume -DfailIfNoTests=false -DskipShade -DskipRecon -DskipDocsmvn clean install -DskipTests -Pdist -DskipShade -DskipRecon -DskipDocs, startedhadoop-ozone/dist/target/ozone-*-SNAPSHOT/compose/ozonewithOZONE_REPLICATION_FACTOR=3 ./run.sh -d, waited for safemode exit, then../test-single.sh om basic/links.robot— 19 tests, 19 passed (including Link to non-existent source volume).https://github.com/rajeshkumarchandolu/ozone/actions/runs/38214984286.