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

Define LOCK object type #194

Closed
alexvanin opened this issue Feb 11, 2022 · 0 comments · Fixed by #196
Closed

Define LOCK object type #194

alexvanin opened this issue Feb 11, 2022 · 0 comments · Fixed by #196

Comments

@alexvanin
Copy link
Contributor

LOCK object type is an object type that restricts object removal. Its payload should be a list of objects that should not be deleted.
If user sends object.Delete request on a object which is in this list, then it should return error.

Question: should object.Put(tombstone) also search for LOCK objects? Or metabase may deny tombstones if there is a LOCK object already /cc @realloc

If Storage node's GC wants to remove an object (due to expiration epoch, for example), it should not do that if LOCK object is present.

LOCK objects distributed over all container nodes the same way as tombstones.

cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 15, 2022
Desc TBD

Add `LOCK` value to `ObjectType` enum.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 15, 2022
Add `status.Object` section for object failures. Add `LOCKED` and
`IRREGULAR_LOCK` codes to it. Return these codes from `Put` and `Delete`
RPCs of `ObjectService`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 16, 2022
Define `object.Lock` message which carries list of locked objects.
Require this message to be a payload of locked objects (`LOCK` type).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 16, 2022
NeoFS introduces object LOCKs - a mechanism for locking an object from,
for example, deletion. Object locks are implemented and stored in the
container as objects, so there is a need to define a new type of system
objects.

Add `LOCK` value to `ObjectType` enum.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 16, 2022
Add `status.Object` section for object failures. Add `LOCKED` and
`IRREGULAR_LOCK` codes to it. Return these codes from `Put` and `Delete`
RPCs of `ObjectService`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 16, 2022
Define `object.Lock` message which carries list of locked objects.
Require this message to be a payload of locked objects (`LOCK` type).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 18, 2022
Create `lock` package and replace `Lock` message into it to follow the
same approach as with `StorageGroup` and `Tombstone`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 18, 2022
…YPE`

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 21, 2022
NeoFS introduces object LOCKs - a mechanism for locking an object from,
for example, deletion. Object locks are implemented and stored in the
container as objects, so there is a need to define a new type of system
objects.

Add `LOCK` value to `ObjectType` enum.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 21, 2022
Add `status.Object` section for object failures. Add `LOCKED` and
`LOCK_NON_REGULAR_OBJECT` codes to it. Return these codes from `Put` and
`Delete` RPCs of `ObjectService`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 21, 2022
Define `object.Lock` message which carries list of locked objects.
Require this message to be a payload of locked objects (`LOCK` type).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 21, 2022
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 21, 2022
…ce RPCs

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 21, 2022
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this issue Feb 22, 2022
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit that referenced this issue Feb 22, 2022
NeoFS introduces object LOCKs - a mechanism for locking an object from,
for example, deletion. Object locks are implemented and stored in the
container as objects, so there is a need to define a new type of system
objects.

Add `LOCK` value to `ObjectType` enum.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit that referenced this issue Feb 22, 2022
Add `status.Object` section for object failures. Add `LOCKED` and
`LOCK_NON_REGULAR_OBJECT` codes to it. Return these codes from `Put` and
`Delete` RPCs of `ObjectService`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit that referenced this issue Feb 22, 2022
Define `object.Lock` message which carries list of locked objects.
Require this message to be a payload of locked objects (`LOCK` type).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit that referenced this issue Feb 22, 2022
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
cthulhu-rider pushed a commit that referenced this issue Feb 22, 2022
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit that referenced this issue Feb 22, 2022
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
@cthulhu-rider cthulhu-rider added this to the v2.12.0 milestone Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants