Repository navigation
HDDS-16649. Reuse bucket metadata after owner verification in S3 PutBucketLifecycleConfiguration - #11374
Closed
rich7420 wants to merge 1 commit into
Closed
HDDS-16649. Reuse bucket metadata after owner verification in S3 PutBucketLifecycleConfiguration#11374rich7420 wants to merge 1 commit into
rich7420 wants to merge 1 commit into
Conversation
…ucketLifecycleConfiguration
priyeshkaratha
approved these changes
Oct 1, 2026
priyeshkaratha
left a comment
Member
There was a problem hiding this comment.
Thanks @rich7420 for the patch. Changes LGTM
adoroszlai
reviewed
Oct 1, 2026
adoroszlai
left a comment
Contributor
There was a problem hiding this comment.
Thanks @rich7420 for the patch.
Comment on lines
+133
to
+137
| OzoneBucket ozoneBucket = verifyBucketOwner(context, bucketName); | ||
| S3LifecycleConfiguration s3LifecycleConfiguration; | ||
| OzoneBucket ozoneBucket = context.getVolume().getBucket(bucketName); | ||
| if (ozoneBucket == null) { | ||
| ozoneBucket = context.getVolume().getBucket(bucketName); | ||
| } |
Contributor
There was a problem hiding this comment.
Instead of changing verifyBucketOwner to return the bucket and handling null case here, I would like to suggest a different approach:
- add
OzoneBucket getBucket(String bucketName)inS3RequestContext, storing the bucket, similar togetVolume(); I think each request applies to only one bucket, so it can reject subsequentgetBucket(differentName)calls for now - use
context.getBucket(bucketName)in bothverifyBucketOwnerand here
Contributor
Author
|
Combined into #11372, which now covers both HDDS-16649 and HDDS-16650 using the request-context bucket cache suggested in review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Reuse the
OzoneBucketfetched during expected bucket owner verification inPutBucketLifecycleConfiguration. Requests that pass verification currently fetch the same bucket again before constructing and setting the lifecycle configuration. Reusing it removes oneInfoBucketRPC while retaining the existing bucket READ requirement, owner validation, bucket layout handling, and error handling. Requests without a non-empty expected-owner header still perform the existing lookup.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16649
How was this patch tested?
TestS3LifecycleConfigurationPuton Java 21.