-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDDS-1950. S3 MPU part-list call fails if there are no parts #1278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elek Thanks for working on this! The changes look good to me. I have few minor comments.
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestKeyManagerUnit.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank You @elek for catching this issue and fix.
💔 -1 overall
This message was automatically generated. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@elek Thanks for updating the PR! The changes look good to me. There is acceptance test failure which I am not able to check. |
💔 -1 overall
This message was automatically generated. |
+1 LGTM. (Need to verify test failures) |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
/retest |
💔 -1 overall
This message was automatically generated. |
Test failures does not look related to this patch. I am going to commit this patch. @lokeshj1703 and @bharatviswa504 Thanks for the reviews. |
Committed to the trunk. Thanks for the contribution @elek |
If an S3 multipart upload is created but no part is upload the part list can't be called because it throws HTTP 500:
Create an MPU:
{code}
aws s3api --endpoint http://localhost:9999 create-multipart-upload --bucket=docker --key=testkeu
{
"Bucket": "docker",
"Key": "testkeu",
"UploadId": "85343e71-4c16-4a75-bb55-01f56a9339b2-102592678478217234"
}
{code}
List the parts:
{code}
aws s3api --endpoint http://localhost:9999 list-parts --bucket=docker --key=testkeu --upload-id=85343e71-4c16-4a75-bb55-01f56a9339b2-102592678478217234
{code}
It throws an exception on the server side, because in the KeyManagerImpl.listParts the ReplicationType is retrieved from the first part:
{code}
HddsProtos.ReplicationType replicationType =
partKeyInfoMap.firstEntry().getValue().getPartKeyInfo().getType();
{code}
Which is not yet available in this use case.
See: https://issues.apache.org/jira/browse/HDDS-1950