Ivan Andika created HDDS-10395:
----------------------------------
Summary: Fix compatibility issue with eTag during MPU listParts
Key: HDDS-10395
URL: https://issues.apache.org/jira/browse/HDDS-10395
Project: Apache Ozone
Issue Type: Improvement
Components: OM, S3
Reporter: Ivan Andika
Assignee: Ivan Andika
Found an eTag incompatibility in S3 listParts while testing the multipart
uploads old S3G and new OMs.
First issue is in KeyManagerImpl#listParts
{code:java}
OmPartInfo omPartInfo = new OmPartInfo(partKeyInfo.getPartNumber(),
partName,
partKeyInfo.getPartKeyInfo().getModificationTime(),
partKeyInfo.getPartKeyInfo().getDataSize(),
partKeyInfo.getPartKeyInfo().getMetadataList().stream()
.filter(keyValue -> keyValue.getKey().equals(ETAG))
.findFirst().get().getValue()); {code}
This will throw "java.util.NoSuchElementException: No value present" in case
where the MPU part does not contain eTag field (before HDDS-9680)
Second issue, is that ObjectEndpoint#listParts is currently only returning the
MPU part eTag, which might not exist for old MPU parts. This can be resolved by
falling back to using partName as eTag if the eTag is not specified.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]