duongnguyen0 opened a new pull request, #3594: URL: https://github.com/apache/ozone/pull/3594
## What changes were proposed in this pull request? Today, a keyLookup (head-object) from S3G makes 3 calls to OM (ref: [ObjectEndpoint](https://github.com/apache/ozone/blob/master/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java#L414), [EndpointBase](https://github.com/apache/ozone/blob/master/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java#L113) and [ObjectStore](https://github.com/apache/ozone/blob/master/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/ObjectStore.java#L135-L135)). 1. getS3VolumeContext: to get the S3 volume name under the tenant (callee) context. 2. getBucket: for no particular reason, maybe it's only for code convenience. 3. headObject(volume, bucket, key): actual key lookup. And that is quite a lot of communication. The call #2 is completely unnecessary and can be avoided easily. The call #1 is required so that S3G can get the volume name for the `headObject call`. Yetut it can be done in OM side when processing `headObject` as well because OM is the authority of S3 volume context when multi-tenancy is enabled. Hence, this call can be avoided by adding a flag to headObject indicating the request is done in S3 context. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-6996 ## How was this patch tested? A section of robot test is added to ensure no regression. -- 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]
