Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a temporary lock of S3 object #59

Open
nettashviro opened this issue Oct 11, 2020 · 0 comments
Open

Implement a temporary lock of S3 object #59

nettashviro opened this issue Oct 11, 2020 · 0 comments

Comments

@nettashviro
Copy link
Collaborator

nettashviro commented Oct 11, 2020

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.

@nettashviro nettashviro transferred this issue from meateam/drive-project Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant