Repository navigation
HDDS-17319. Ignore decoded content length for non-streaming PutObject - #11714
Open
andyhuangdev wants to merge 1 commit into
Open
andyhuangdev wants to merge 1 commit into
andyhuangdev wants to merge 1 commit into
Conversation
Contributor
|
Thanks for the patch. I would like to defer merging this after #11735, which will (hopefully) allow skipping most integration tests for S3-only changes. |
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?
S3 Gateway parses x-amz-decoded-content-length during PutObject directory detection, even for non-streaming uploads. Non-numeric or overflowing values cause a NumberFormatException and an HTTP 500 response.
This change limits decoded content length parsing to streaming uploads, preserving existing streaming behavior. Non-streaming uploads ignore the header and use Content-Length, matching the Amazon S3 behavior reported in the Jira. It also prevents a decoded length of 0 from incorrectly triggering FSO directory creation for non-empty uploads.
What is the link to the Apache JIRA
HDDS-17319
How was this patch tested?
Added regression tests covering ignored decoded content length values for non-streaming uploads and preventing incorrect FSO directory creation.
All 112 tests in TestObjectPut passed:
mvn -pl :ozone-s3gateway test -Dtest=TestObjectPut -DskipShade -DskipRecon -DskipDocs
Checkstyle passed:
./hadoop-ozone/dev-support/checks/checkstyle.sh