smengcl opened a new pull request #2814: URL: https://github.com/apache/ozone/pull/2814
https://issues.apache.org/jira/browse/HDDS-5891 1. `BucketManagerImpl#getBucketInfo` can now throw `VOLUME_NOT_FOUND` if the parent volume **doesn't exist**, and will only throw `BUCKET_NOT_FOUND` if the parent volume **exists** but the bucket doesn't. Before this change it throws `BUCKET_NOT_FOUND` regardless of whether parent volume exists. Related prior comment: https://github.com/apache/ozone/pull/2412#discussion_r672513719 2. With the patch, `BasicRootedOzoneClientAdapterImpl#getBucket` will no longer attempt to create the volume if the volume exists. Previously it wouldn't distinguish the different results. This fixes the issue mentioned in the jira title, where `getBucket` can fail when a non-privileged user tries to `createIfNotExist` but fail because he/she wouldn't pass the volume create permission check -- which doesn't make sense to be checked in the first place in this case. ## Testing - Some integration/acceptance tests might be broken as a result of (1). Pending CI. -- 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]
