If a multipart is aborted, the behavior for a real S3 appliance is as follows:
- If the key already existed, the previous version of the file will remain
- If the key did not exist, no object will exist for that key
To make this client behave similar to S3, we should do the following:
- When writing multipart, use a temporary object in iRODS rather than the destination file.
- If multipart is aborted, simply remove the temporary object from iRODS. If there was an original object it would remain unchanged. If there was no original object then no object will exist.
- On multipart completion, first flush the local part files to the temporary object in iRODS then as the last step rename (with force option) to the final object name.
If a multipart is aborted, the behavior for a real S3 appliance is as follows:
To make this client behave similar to S3, we should do the following: