Skip to content

Commit

Permalink
[nspcc-dev#194] object: Add LOCK type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Leonard Lyubich committed Feb 21, 2022
1 parent 35e9840 commit ec14ce6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions object/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import "refs/types.proto";
import "session/types.proto";

// Type of the object payload content. Only `REGULAR` type objects can be split,
// hence `TOMBSTONE` and `STORAGE_GROUP` payload is limited by maximal object
// size.
// hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by maximal
// object size.
//
// String presentation of object type is the same as definition:
// * REGULAR
// * TOMBSTONE
// * STORAGE_GROUP
// * LOCK
enum ObjectType {
// Just a normal object
REGULAR = 0;
Expand All @@ -25,6 +26,9 @@ enum ObjectType {

// StorageGroup information
STORAGE_GROUP = 2;

// Object lock
LOCK = 3;
}

// Type of match expression
Expand Down

0 comments on commit ec14ce6

Please sign in to comment.