irods / irods_client_s3_api

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

Reject multiple multipart uploads to the same key #127

Open JustinKyleJames opened 4 hours ago

JustinKyleJames commented 4 hours 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 4 hours 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 4 hours 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