BubbleCal opened a new issue, #927:
URL: https://github.com/apache/arrow-rs-object-store/issues/927

   ### Describe the bug
   
   With the native AWS backend configured for `S3CopyIfNotExists::Header` using 
`If-None-Match: *`, S3 Express can return HTTP 200 with a root XML 
`PreconditionFailed` error when the destination already exists. The SDK accepts 
this response as a successful copy.
   
   The multipart form has two related S3 Express failures. `UploadPartCopy` 
requires IAM credentials and currently uses S3 Express session credentials. A 
client with a default object condition can also pass that condition to 
`CreateSession`, which rejects it when acquiring a fresh session.
   
   ### Expected behavior
   
   An existing destination should produce `AlreadyExists`. An ambiguous HTTP 
409 or a missing multipart upload should remain an operation failure so callers 
can handle it without assuming the destination exists. `UploadPartCopy` should 
use IAM credentials, and session acquisition should receive only headers valid 
for that request.
   
   ### Reproduction
   
   Use an S3 Express directory bucket with an existing destination and call 
`copy_if_not_exists` in header mode using `If-None-Match: *`. The response can 
contain a root `PreconditionFailed` even though its HTTP status is 200. With 
multipart mode, try a nonempty source to exercise `UploadPartCopy`.
   
   [AWS 
CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
 · [AWS 
UploadPartCopy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
 · [AWS 
CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to