[
https://issues.apache.org/jira/browse/HDDS-17202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chu Cheng Li updated HDDS-17202:
--------------------------------
Status: Patch Available (was: Open)
> S3 If-Match writes return PreconditionFailed instead of NoSuchKey for missing
> objects
> -------------------------------------------------------------------------------------
>
> Key: HDDS-17202
> URL: https://issues.apache.org/jira/browse/HDDS-17202
> Project: Apache Ozone
> Issue Type: Bug
> Components: S3
> Reporter: Chu Cheng Li
> Assignee: Chu Cheng Li
> Priority: Major
> Labels: pull-request-available
>
> S3 Gateway returns 412 PreconditionFailed for PutObject,
> CompleteMultipartUpload, and CopyObject when If-Match is set and the
> destination object does not exist. These writes should return 404 NoSuchKey.
> AWS documents the missing-object behavior here:
> https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html
> To reproduce, create and delete an object, then issue PutObject with
> If-Match: * or an entity ETag for the deleted key. The request returns 412
> instead of 404. Completing a multipart upload with If-Match against a missing
> destination has the same problem.
> OM already reports KEY_NOT_FOUND, but S3 Gateway overrides it to
> PreconditionFailed for If-Match writes. Use the existing NoSuchKey mapping,
> while keeping ETag mismatches on existing objects as PreconditionFailed.
> Cover normal and streaming writes, multipart completion, and CopyObject.
> This is a follow-up to HDDS-16622. In the Ceph test_put_object_if_match and
> test_multipart_put_object_if_match cases, the If-None-Match checks pass with
> that patch, then the later If-Match checks fail after deleting the object:
> https://github.com/apache/ozone/pull/11366#issuecomment-6288160577
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]