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

   ## What changes were proposed in this pull request?
   
   `BucketEndpoint` is responsible for converting `OMException` to 
`OS3Exception`, but bucket management methods inherited from `EndpointBase` 
also do it for some result codes.  These are called from inner handler methods 
(within audited block).  This causes audit log to show the wrong exception 
(`OS3Exception`) in some cases.  This change is the first step towards fixing 
that, follow-up will handle remaining `getBucket` usage.
   
   - Merge `EndpointBase#createS3Bucket` and `#deleteS3Bucket` into 
`BucketCrudHandler`
   - Remove unused `EndpointBase#getBucket(OzoneVolume, String)`
   - Reduce usage of `EndpointBase#getBucket(String)`
   - Create `OzoneBucketStub#isEmpty` to reduce extra logic related to 
"emptiness" in `ObjectStoreStub` (both of these objects are used only in unit 
tests).  Previous logic allowed `TestS3GatewayMetrics#testDeleteBucketSuccess` 
to delete a non-empty bucket because "non-empty" flag was not set.
   
   https://issues.apache.org/jira/browse/HDDS-15003
   
   ## How was this patch tested?
   
   https://github.com/adoroszlai/ozone/actions/runs/24191772810


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