Skip to content

Use a temporary file with an atomic rename at the end of multipart upload processing #220

@JustinKyleJames

Description

@JustinKyleJames

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions