Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Similar to #9528: reduce parameter count in ObjectEndpoint request handlers by getting query parameters from the request context.

https://issues.apache.org/jira/browse/HDDS-14209

How was this patch tested?

CI:
https://github.com/adoroszlai/ozone/actions/runs/20379663044

@adoroszlai adoroszlai self-assigned this Dec 19, 2025
@adoroszlai adoroszlai added s3 S3 Gateway code-cleanup Changes that aim to make code better, without changing functionality. labels Dec 19, 2025
@rich7420
Copy link
Contributor

Thanks for the patch @adoroszlai !

throws IOException, OS3Exception {
CompleteMultipartUploadRequest multipartUploadRequest
) throws IOException, OS3Exception {
final String uploadID = getQueryParam(QueryParams.UPLOAD_ID);
Copy link
Contributor

Choose a reason for hiding this comment

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

Although underlying checkNotNull throws exception, it returns NullPointerException, not S3 standard error.
Should we add validation here?

Suggested change
final String uploadID = getQueryParam(QueryParams.UPLOAD_ID);
final String uploadID = getQueryParam(QueryParams.UPLOAD_ID);
if (StringUtils.isEmpty(uploadID)) {
throw newError(INVALID_ARGUMENT, key,
new IllegalArgumentException("uploadId is required"));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

plz correct me if I'm wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated.

@adoroszlai adoroszlai marked this pull request as draft December 20, 2025 10:59
@adoroszlai
Copy link
Contributor Author

Converted to draft and implementing HDDS-14221 first, to reduce changes.

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

Labels

code-cleanup Changes that aim to make code better, without changing functionality. s3 S3 Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants