Skip to content

HDDS-8011. IllegalArgumentException logged for invalid user-defined metadata#5160

Merged
ChenSammi merged 6 commits into
apache:masterfrom
Tejaskriya:HDDS-8011
Aug 21, 2023
Merged

HDDS-8011. IllegalArgumentException logged for invalid user-defined metadata#5160
ChenSammi merged 6 commits into
apache:masterfrom
Tejaskriya:HDDS-8011

Conversation

@Tejaskriya
Copy link
Copy Markdown
Contributor

@Tejaskriya Tejaskriya commented Aug 8, 2023

What changes were proposed in this pull request?

Replacing the IllegalArgumentException thrown with a new OS3Exception for MetadataTooLarge.

What is the link to the Apache JIRA

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

How was this patch tested?

Manually tested in Docker set-up using an API development tool to send a request to s3g.
cURL form of the request used to test: https://gist.github.com/Tejaskriya/7a8740cb2152ba7704030835ae8b85f1
Output seen:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>MetadataTooLarge</Code>
  <Message>Your metadata headers exceed the maximum allowed metadata size.</Message>
  <Resource>x-amz-meta-b</Resource>
  <RequestId>2f65ae49-bf28-4947-9504-dddca6fc0452</RequestId>
</Error>

Also tested using a test case in TestEndpointBase.java.

@Tejaskriya Tejaskriya marked this pull request as ready for review August 8, 2023 10:50
@Tejaskriya Tejaskriya requested a review from Xushaohong August 8, 2023 11:55
@Tejaskriya Tejaskriya changed the title HDDS- 8011. IllegalArgumentException logged for invalid user-defined metadata HDDS-8011. IllegalArgumentException logged for invalid user-defined metadata Aug 14, 2023
@Tejaskriya
Copy link
Copy Markdown
Contributor Author

@Xushaohong Could you please review this again, I have made all the suggested changes!

@Xushaohong
Copy link
Copy Markdown
Contributor

Xushaohong commented Aug 16, 2023

@Xushaohong Could you please review this again, I have made all the suggested changes!

Looks fine to me now. Thx @Tejaskriya

@adoroszlai Could you please help take a look?

Copy link
Copy Markdown
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

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

Thanks @Tejaskriya for the patch, LGTM +1.

Copy link
Copy Markdown
Contributor

@ChenSammi ChenSammi left a comment

Choose a reason for hiding this comment

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

Thanks @Tejaskriya for the contribution.

@ChenSammi ChenSammi merged commit 5cf43fc into apache:master Aug 21, 2023
@Tejaskriya Tejaskriya deleted the HDDS-8011 branch September 13, 2023 10:44
jojochuang pushed a commit to jojochuang/ozone that referenced this pull request Feb 1, 2024
…er-defined metadata (apache#5160)

(cherry picked from commit 5cf43fc)
Change-Id: Ie0fc164121a31f0d090a216791b9ca56ae34d0ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants