Skip to content

HDDS-15003. Inline EndpointBase#createS3Bucket/deleteS3Bucket#10060

Merged
ivandika3 merged 1 commit intoapache:masterfrom
adoroszlai:HDDS-15003
Apr 10, 2026
Merged

HDDS-15003. Inline EndpointBase#createS3Bucket/deleteS3Bucket#10060
ivandika3 merged 1 commit intoapache:masterfrom
adoroszlai:HDDS-15003

Conversation

@adoroszlai
Copy link
Copy Markdown
Contributor

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

@adoroszlai adoroszlai self-assigned this Apr 9, 2026
@adoroszlai adoroszlai added the s3 S3 Gateway label Apr 9, 2026
Copy link
Copy Markdown
Member

@peterxcli peterxcli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor

@ivandika3 ivandika3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adoroszlai , LGTM +1.

@ivandika3 ivandika3 merged commit 4501218 into apache:master Apr 10, 2026
45 checks passed
@ivandika3
Copy link
Copy Markdown
Contributor

Thanks @adoroszlai for the patch and @peterxcli for the review.

@adoroszlai adoroszlai deleted the HDDS-15003 branch April 10, 2026 06:11
@adoroszlai
Copy link
Copy Markdown
Contributor Author

Thanks @ivandika3, @peterxcli for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 S3 Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants