Skip to content

Implement a temporary lock of S3 object #59

Open
@nettashviro

Description

A dilemma that needs to be discussed - we need to implement a locking mechanism for the object. When a user initializes a move or copy operation of an object, the deletion/editing operations of the object must be blocked until the transfer operation is completed.

I thought of several ways to implement this mechanism:

  1. Block with mutex.lock in go - (thread synchronization) . We need to make sure that it is possible to create a mutex that is interpreted over several instances of the services.

  2. Block inside the s3 system with temporary object lock policy - This technique is less recommended, can cause problems according to the team responsible for the S3 (talked with Ido pal) . In addition, for this method to work, you need to change all the info of the existing buckets.

  3. Blocking with rabbit / kafka - we need to make a collection of tasks in DB, when a task of tranfer/copy an object is started we need to change the document of the object with status "in progress". Only when the task is finished and the user will be able to delete or edit the same object.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions