rajeshkumarchandolu opened a new pull request, #11368:
URL: https://github.com/apache/ozone/pull/11368

   ## What changes were proposed in this pull request?
   
   When a client strictly follows a bucket link (for example `ozone sh key 
list` on a link bucket) and the linked **source** volume or bucket does not 
exist, Ozone previously often returned **`VOLUME_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 
in `visited`, if resolution fails with `VOLUME_NOT_FOUND` or 
`BUCKET_NOT_FOUND`, OM throws **`BUCKET_NOT_FOUND`** with message `Cannot 
follow bucket link: linked source bucket does not exist`. Direct lookups (no 
link hop) and dangling-link create/metadata paths are unchanged. No new 
`ResultCodes` or proto `Status` values are introduced.
   
   Coverage: two unit tests in `TestBucketManagerImpl` (`resolveBucketLink` and 
`listKeys`), and a new case in `links.robot` for 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?
   
   - **Unit tests:** `mvn -pl :ozone-manager test 
-Dtest=TestBucketManagerImpl#testResolveBucketLinkMissingSourceVolume,TestBucketManagerImpl#testListKeysOnLinkWithMissingSourceVolume
 -DfailIfNoTests=false -DskipShade -DskipRecon -DskipDocs`
   - **Smoketest:** After `mvn clean install -DskipTests -Pdist -DskipShade 
-DskipRecon -DskipDocs`, started 
`hadoop-ozone/dist/target/ozone-*-SNAPSHOT/compose/ozone` with 
`OZONE_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**).
   - **Checkstyle:** `./hadoop-ozone/dev-support/checks/checkstyle.sh` (run 
locally before push).


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