irods / irods_client_s3_api

C++ S3 API for iRODS
BSD 3-Clause "New" or "Revised" License
0 stars 6 forks source link

Reject multiple multipart uploads to the same key #127

Open JustinKyleJames opened 1 month ago

JustinKyleJames commented 1 month ago

While I believe AWS allows multiple multipart uploads simultaneously to the same key, this doesn't make sense in the way we are implementing things as we are now sometimes writing parts directly to iRODS.

We should reject a CreateMultipartUpload request if there is already one in progress to that same key.

korydraughn commented 1 month ago

This will need to be documented in the README.

We also need to pick an appropriate HTTP status code to return to the client.

trel commented 1 month ago

i propose...

409 Conflict - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409

In other systems, 409 responses may be used for implementation-specific purposes, such as to indicate that the server has received multiple requests to update the same resource.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409#concurrent_tasks_disallowed