rich7420 commented on code in PR #11479:
URL: https://github.com/apache/ozone/pull/11479#discussion_r4444258222


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -1220,13 +1217,14 @@ private CopyObjectResponse copyObject(OzoneVolume 
volume,
 
     if (S3Owner.hasBucketOwnershipVerificationConditions(getHeaders())) {
       final String sourceBucketOwner = runWithS3ActionString(
-          "GetObject", () -> volume.getBucket(sourceBucket).getOwner());
+          "GetObject", () -> getClientProtocol().getBucketDetails(null, 
sourceBucket).getOwner());

Review Comment:
   nit: Could we reuse the destination volume here and in UploadPartCopy? 
Tested full requests with owner headers at apparent version 101: 
`GetS3VolumeContext` calls drop from two to one.



##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3RequestContext.java:
##########
@@ -59,13 +59,20 @@ OzoneVolume getVolume() throws IOException {
 
   OzoneBucket getBucket(String name) throws IOException {
     if (bucket == null) {
-      bucket = getVolume().getBucket(name);
+      bucket = endpoint.getClientProtocol().getBucketDetails(volume != null ? 
volume.getName() : null, name);

Review Comment:
   nit: Could the remaining handlers use `getVolumeName()` too? DELETE bucket 
with an expected-owner header resolves the volume twice on older OMs.



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