forked from TrueCloudLab/frostfs-api
[#19] Remove storage groups
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
f2a60016ab
commit
51d330b06a
4 changed files with 111 additions and 139 deletions
|
@ -9,6 +9,7 @@
|
||||||
### Removed
|
### Removed
|
||||||
- Reputation system (#22)
|
- Reputation system (#22)
|
||||||
- All `subnet` related fields and types (#25)
|
- All `subnet` related fields and types (#25)
|
||||||
|
- Storage group (#19)
|
||||||
|
|
||||||
## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島)
|
## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島)
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ import "session/types.proto";
|
||||||
// not affect the sidechain and are only served by nodes in p2p style.
|
// not affect the sidechain and are only served by nodes in p2p style.
|
||||||
service ObjectService {
|
service ObjectService {
|
||||||
// Receive full object structure, including Headers and payload. Response uses
|
// Receive full object structure, including Headers and payload. Response uses
|
||||||
// gRPC stream. First response message carries the object with the requested address.
|
// gRPC stream. First response message carries the object with the requested
|
||||||
// Chunk messages are parts of the object's payload if it is needed. All
|
// address. Chunk messages are parts of the object's payload if it is needed.
|
||||||
// messages, except the first one, carry payload chunks. The requested object can
|
// All messages, except the first one, carry payload chunks. The requested
|
||||||
// be restored by concatenation of object message payload and all chunks
|
// object can be restored by concatenation of object message payload and all
|
||||||
// keeping the receiving order.
|
// chunks keeping the receiving order.
|
||||||
//
|
//
|
||||||
// Extended headers can change `Get` behaviour:
|
// Extended headers can change `Get` behaviour:
|
||||||
// * [ __SYSTEM__NETMAP_EPOCH ] \
|
// * [ __SYSTEM__NETMAP_EPOCH ] \
|
||||||
|
@ -26,9 +26,10 @@ service ObjectService {
|
||||||
// calculation.
|
// calculation.
|
||||||
// * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \
|
// * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \
|
||||||
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
|
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
|
||||||
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or
|
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH`
|
||||||
// the latest one otherwise) of Network Map to find an object until the depth
|
// (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one
|
||||||
// limit is reached.
|
// otherwise) of Network Map to find an object until the depth limit is
|
||||||
|
// reached.
|
||||||
//
|
//
|
||||||
// Please refer to detailed `XHeader` description.
|
// Please refer to detailed `XHeader` description.
|
||||||
//
|
//
|
||||||
|
@ -70,15 +71,16 @@ service ObjectService {
|
||||||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||||
// write access to the container is denied;
|
// write access to the container is denied;
|
||||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||||
// placement of an object of type TOMBSTONE that includes at least one locked
|
// placement of an object of type TOMBSTONE that includes at least one
|
||||||
// object is prohibited;
|
// locked object is prohibited;
|
||||||
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
||||||
// placement of an object of type LOCK that includes at least one object of
|
// placement of an object of type LOCK that includes at least one object of
|
||||||
// type other than REGULAR is prohibited;
|
// type other than REGULAR is prohibited;
|
||||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||||
// object storage container not found;
|
// object storage container not found;
|
||||||
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
||||||
// (for trusted object preparation) session private key does not exist or has
|
// (for trusted object preparation) session private key does not exist or
|
||||||
|
// has
|
||||||
// been deleted;
|
// been deleted;
|
||||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||||
// provided session token has expired.
|
// provided session token has expired.
|
||||||
|
@ -166,8 +168,8 @@ service ObjectService {
|
||||||
|
|
||||||
// Get byte range of data payload. Range is set as an (offset, length) tuple.
|
// Get byte range of data payload. Range is set as an (offset, length) tuple.
|
||||||
// Like in `Get` method, the response uses gRPC stream. Requested range can be
|
// Like in `Get` method, the response uses gRPC stream. Requested range can be
|
||||||
// restored by concatenation of all received payload chunks keeping the receiving
|
// restored by concatenation of all received payload chunks keeping the
|
||||||
// order.
|
// receiving order.
|
||||||
//
|
//
|
||||||
// Extended headers can change `GetRange` behaviour:
|
// Extended headers can change `GetRange` behaviour:
|
||||||
// * [ __SYSTEM__NETMAP_EPOCH ] \
|
// * [ __SYSTEM__NETMAP_EPOCH ] \
|
||||||
|
@ -233,7 +235,8 @@ service ObjectService {
|
||||||
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
||||||
|
|
||||||
// Put the prepared object into container.
|
// Put the prepared object into container.
|
||||||
// `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of an object MUST be set.
|
// `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of
|
||||||
|
// an object MUST be set.
|
||||||
//
|
//
|
||||||
// Extended headers can change `Put` behaviour:
|
// Extended headers can change `Put` behaviour:
|
||||||
// * [ __SYSTEM__NETMAP_EPOCH \
|
// * [ __SYSTEM__NETMAP_EPOCH \
|
||||||
|
@ -250,15 +253,16 @@ service ObjectService {
|
||||||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||||
// write access to the container is denied;
|
// write access to the container is denied;
|
||||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||||
// placement of an object of type TOMBSTONE that includes at least one locked
|
// placement of an object of type TOMBSTONE that includes at least one
|
||||||
// object is prohibited;
|
// locked object is prohibited;
|
||||||
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
||||||
// placement of an object of type LOCK that includes at least one object of
|
// placement of an object of type LOCK that includes at least one object of
|
||||||
// type other than REGULAR is prohibited;
|
// type other than REGULAR is prohibited;
|
||||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||||
// object storage container not found;
|
// object storage container not found;
|
||||||
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
||||||
// (for trusted object preparation) session private key does not exist or has
|
// (for trusted object preparation) session private key does not exist or
|
||||||
|
// has
|
||||||
// been deleted;
|
// been deleted;
|
||||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||||
// provided session token has expired.
|
// provided session token has expired.
|
||||||
|
@ -346,16 +350,16 @@ message PutRequest {
|
||||||
// Object's Header
|
// Object's Header
|
||||||
Header header = 3;
|
Header header = 3;
|
||||||
|
|
||||||
// Number of copies of the object to store within the RPC call. By default,
|
// Number of copies of the object to store within the RPC call. By
|
||||||
// object is processed according to the container's placement policy.
|
// default, object is processed according to the container's placement
|
||||||
// Can be one of:
|
// policy. Can be one of:
|
||||||
// 1. A single number; applied to the whole request and is treated as
|
// 1. A single number; applied to the whole request and is treated as
|
||||||
// a minimal number of nodes that must store an object to complete the
|
// a minimal number of nodes that must store an object to complete the
|
||||||
// request successfully.
|
// request successfully.
|
||||||
// 2. An ordered array; every number is treated as a minimal number of
|
// 2. An ordered array; every number is treated as a minimal number of
|
||||||
// nodes in a corresponding placement vector that must store an object
|
// nodes in a corresponding placement vector that must store an object
|
||||||
// to complete the request successfully. The length MUST equal the placement
|
// to complete the request successfully. The length MUST equal the
|
||||||
// vectors number, otherwise request is considered malformed.
|
// placement vectors number, otherwise request is considered malformed.
|
||||||
repeated uint32 copies_number = 4;
|
repeated uint32 copies_number = 4;
|
||||||
}
|
}
|
||||||
// Single message in the request stream.
|
// Single message in the request stream.
|
||||||
|
@ -523,11 +527,11 @@ message SearchRequest {
|
||||||
|
|
||||||
// Version of the Query Language used
|
// Version of the Query Language used
|
||||||
uint32 version = 2;
|
uint32 version = 2;
|
||||||
// Filter structure checks if the object header field or the attribute content
|
// Filter structure checks if the object header field or the attribute
|
||||||
// matches a value.
|
// content matches a value.
|
||||||
//
|
//
|
||||||
// If no filters are set, search request will return all objects of the
|
// If no filters are set, search request will return all objects of the
|
||||||
// container, including Regular object, Tombstones and Storage Group
|
// container, including Regular object and Tombstone
|
||||||
// objects. Most human users expect to get only object they can directly
|
// objects. Most human users expect to get only object they can directly
|
||||||
// work with. In that case, `$Object:ROOT` filter should be used.
|
// work with. In that case, `$Object:ROOT` filter should be used.
|
||||||
//
|
//
|
||||||
|
@ -562,11 +566,11 @@ message SearchRequest {
|
||||||
// properties:
|
// properties:
|
||||||
//
|
//
|
||||||
// * $Object:ROOT \
|
// * $Object:ROOT \
|
||||||
// Returns only `REGULAR` type objects that are not split or that are the top
|
// Returns only `REGULAR` type objects that are not split or that are the
|
||||||
// level root objects in a split hierarchy. This includes objects not
|
// top level root objects in a split hierarchy. This includes objects not
|
||||||
// present physically, like large objects split into smaller objects
|
// present physically, like large objects split into smaller objects
|
||||||
// without a separate top-level root object. Objects of other types like
|
// without a separate top-level root object. Objects of other types like
|
||||||
// StorageGroups and Tombstones will not be shown. This filter may be
|
// Locks and Tombstones will not be shown. This filter may be
|
||||||
// useful for listing objects like `ls` command of some virtual file
|
// useful for listing objects like `ls` command of some virtual file
|
||||||
// system. This filter is activated if the `key` exists, disregarding the
|
// system. This filter is activated if the `key` exists, disregarding the
|
||||||
// value and matcher type.
|
// value and matcher type.
|
||||||
|
@ -575,8 +579,8 @@ message SearchRequest {
|
||||||
// activated if the `key` exists, disregarding the value and matcher type.
|
// activated if the `key` exists, disregarding the value and matcher type.
|
||||||
//
|
//
|
||||||
// Note: using filters with a key with prefix `$Object:` and match type
|
// Note: using filters with a key with prefix `$Object:` and match type
|
||||||
// `NOT_PRESENT `is not recommended since this is not a cross-version approach.
|
// `NOT_PRESENT `is not recommended since this is not a cross-version
|
||||||
// Behavior when processing this kind of filters is undefined.
|
// approach. Behavior when processing this kind of filters is undefined.
|
||||||
message Filter {
|
message Filter {
|
||||||
// Match type to use
|
// Match type to use
|
||||||
MatchType match_type = 1 [ json_name = "matchType" ];
|
MatchType match_type = 1 [ json_name = "matchType" ];
|
||||||
|
@ -772,8 +776,7 @@ message PutSingleRequest {
|
||||||
// Object PUT Single response
|
// Object PUT Single response
|
||||||
message PutSingleResponse {
|
message PutSingleResponse {
|
||||||
// PUT Single Object response body
|
// PUT Single Object response body
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
// Body of put single object response message.
|
// Body of put single object response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,12 @@ import "refs/types.proto";
|
||||||
import "session/types.proto";
|
import "session/types.proto";
|
||||||
|
|
||||||
// Type of the object payload content. Only `REGULAR` type objects can be split,
|
// Type of the object payload content. Only `REGULAR` type objects can be split,
|
||||||
// hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum
|
// hence `TOMBSTONE` and `LOCK` payload is limited by the
|
||||||
// object size.
|
// maximum object size.
|
||||||
//
|
//
|
||||||
// String presentation of object type is the same as definition:
|
// String presentation of object type is the same as definition:
|
||||||
// * REGULAR
|
// * REGULAR
|
||||||
// * TOMBSTONE
|
// * TOMBSTONE
|
||||||
// * STORAGE_GROUP
|
|
||||||
// * LOCK
|
// * LOCK
|
||||||
enum ObjectType {
|
enum ObjectType {
|
||||||
// Just a normal object
|
// Just a normal object
|
||||||
|
@ -24,8 +23,8 @@ enum ObjectType {
|
||||||
// Used internally to identify deleted objects
|
// Used internally to identify deleted objects
|
||||||
TOMBSTONE = 1;
|
TOMBSTONE = 1;
|
||||||
|
|
||||||
// StorageGroup information
|
// Unused (previously storageGroup information)
|
||||||
STORAGE_GROUP = 2;
|
// _ = 2;
|
||||||
|
|
||||||
// Object lock
|
// Object lock
|
||||||
LOCK = 3;
|
LOCK = 3;
|
||||||
|
@ -72,7 +71,8 @@ message ShortHeader {
|
||||||
neo.fs.v2.refs.Checksum payload_hash = 6 [ json_name = "payloadHash" ];
|
neo.fs.v2.refs.Checksum payload_hash = 6 [ json_name = "payloadHash" ];
|
||||||
|
|
||||||
// Homomorphic hash of the object payload
|
// Homomorphic hash of the object payload
|
||||||
neo.fs.v2.refs.Checksum homomorphic_hash = 7 [json_name = "homomorphicHash"];
|
neo.fs.v2.refs.Checksum homomorphic_hash = 7
|
||||||
|
[ json_name = "homomorphicHash" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object Header
|
// Object Header
|
||||||
|
@ -101,11 +101,13 @@ message Header {
|
||||||
ObjectType object_type = 7 [ json_name = "objectType" ];
|
ObjectType object_type = 7 [ json_name = "objectType" ];
|
||||||
|
|
||||||
// Homomorphic hash of the object payload
|
// Homomorphic hash of the object payload
|
||||||
neo.fs.v2.refs.Checksum homomorphic_hash = 8 [json_name = "homomorphicHash"];
|
neo.fs.v2.refs.Checksum homomorphic_hash = 8
|
||||||
|
[ json_name = "homomorphicHash" ];
|
||||||
|
|
||||||
// Session token, if it was used during Object creation. Need it to verify
|
// Session token, if it was used during Object creation. Need it to verify
|
||||||
// integrity and authenticity out of Request scope.
|
// integrity and authenticity out of Request scope.
|
||||||
neo.fs.v2.session.SessionToken session_token = 9 [json_name = "sessionToken"];
|
neo.fs.v2.session.SessionToken session_token = 9
|
||||||
|
[ json_name = "sessionToken" ];
|
||||||
|
|
||||||
// `Attribute` is a user-defined Key-Value metadata pair attached to an
|
// `Attribute` is a user-defined Key-Value metadata pair attached to an
|
||||||
// object.
|
// object.
|
||||||
|
@ -114,8 +116,8 @@ message Header {
|
||||||
// Objects with duplicated attribute names or attributes with empty values
|
// Objects with duplicated attribute names or attributes with empty values
|
||||||
// will be considered invalid.
|
// will be considered invalid.
|
||||||
//
|
//
|
||||||
// There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix
|
// There are some "well-known" attributes starting with `__SYSTEM__`
|
||||||
// that affect system behaviour:
|
// (`__NEOFS__` is deprecated) prefix that affect system behaviour:
|
||||||
//
|
//
|
||||||
// * [ __SYSTEM__UPLOAD_ID ] \
|
// * [ __SYSTEM__UPLOAD_ID ] \
|
||||||
// (`__NEOFS__UPLOAD_ID` is deprecated) \
|
// (`__NEOFS__UPLOAD_ID` is deprecated) \
|
||||||
|
@ -174,7 +176,8 @@ message Header {
|
||||||
neo.fs.v2.refs.ObjectID previous = 2 [ json_name = "previous" ];
|
neo.fs.v2.refs.ObjectID previous = 2 [ json_name = "previous" ];
|
||||||
|
|
||||||
// `signature` field of the parent object. Used to reconstruct parent.
|
// `signature` field of the parent object. Used to reconstruct parent.
|
||||||
neo.fs.v2.refs.Signature parent_signature = 3 [json_name = "parentSignature"];
|
neo.fs.v2.refs.Signature parent_signature = 3
|
||||||
|
[ json_name = "parentSignature" ];
|
||||||
|
|
||||||
// `header` field of the parent object. Used to reconstruct parent.
|
// `header` field of the parent object. Used to reconstruct parent.
|
||||||
Header parent_header = 4 [ json_name = "parentHeader" ];
|
Header parent_header = 4 [ json_name = "parentHeader" ];
|
||||||
|
@ -186,15 +189,14 @@ message Header {
|
||||||
// unique inside container. All objects participating in the split must have
|
// unique inside container. All objects participating in the split must have
|
||||||
// the same `split_id` value.
|
// the same `split_id` value.
|
||||||
bytes split_id = 6 [ json_name = "splitID" ];
|
bytes split_id = 6 [ json_name = "splitID" ];
|
||||||
|
|
||||||
}
|
}
|
||||||
// Position of the object in the split hierarchy
|
// Position of the object in the split hierarchy
|
||||||
Split split = 11 [ json_name = "split" ];
|
Split split = 11 [ json_name = "split" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object structure. Object is immutable and content-addressed. It means
|
// Object structure. Object is immutable and content-addressed. It means
|
||||||
// `ObjectID` will change if the header or the payload changes. It's calculated as a
|
// `ObjectID` will change if the header or the payload changes. It's calculated
|
||||||
// hash of header field which contains hash of the object's payload.
|
// as a hash of header field which contains hash of the object's payload.
|
||||||
//
|
//
|
||||||
// For non-regular object types payload format depends on object type specified
|
// For non-regular object types payload format depends on object type specified
|
||||||
// in the header.
|
// in the header.
|
||||||
|
@ -214,8 +216,8 @@ message Object {
|
||||||
|
|
||||||
// Meta information of split hierarchy for object assembly. With the last part
|
// Meta information of split hierarchy for object assembly. With the last part
|
||||||
// one can traverse linked list of split hierarchy back to the first part and
|
// one can traverse linked list of split hierarchy back to the first part and
|
||||||
// assemble the original object. With a linking object one can assemble an object
|
// assemble the original object. With a linking object one can assemble an
|
||||||
// right from the object parts.
|
// object right from the object parts.
|
||||||
message SplitInfo {
|
message SplitInfo {
|
||||||
// 16 byte UUID used to identify the split object hierarchy parts.
|
// 16 byte UUID used to identify the split object hierarchy parts.
|
||||||
bytes split_id = 1;
|
bytes split_id = 1;
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
syntax = "proto3";
|
|
||||||
|
|
||||||
package neo.fs.v2.storagegroup;
|
|
||||||
|
|
||||||
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/storagegroup/grpc;storagegroup";
|
|
||||||
option csharp_namespace = "Neo.FileStorage.API.StorageGroup";
|
|
||||||
|
|
||||||
import "refs/types.proto";
|
|
||||||
|
|
||||||
// StorageGroup keeps verification information for Data Audit sessions. Objects
|
|
||||||
// that require paid storage guarantees are gathered in `StorageGroups` with
|
|
||||||
// additional information used for the proof of storage. `StorageGroup` only
|
|
||||||
// contains objects from the same container.
|
|
||||||
//
|
|
||||||
// Being an object payload, StorageGroup may have expiration Epoch set with
|
|
||||||
// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup
|
|
||||||
// will be ignored by InnerRing nodes during Data Audit cycles and will be
|
|
||||||
// deleted by Storage Nodes.
|
|
||||||
//
|
|
||||||
message StorageGroup {
|
|
||||||
// Total size of the payloads of objects in the storage group
|
|
||||||
uint64 validation_data_size = 1 [json_name = "validationDataSize"];
|
|
||||||
|
|
||||||
// Homomorphic hash from the concatenation of the payloads of the storage
|
|
||||||
// group members. The order of concatenation is the same as the order of the
|
|
||||||
// members in the `members` field.
|
|
||||||
neo.fs.v2.refs.Checksum validation_hash = 2 [json_name = "validationHash"];
|
|
||||||
|
|
||||||
// DEPRECATED. Last NeoFS epoch number of the storage group lifetime
|
|
||||||
uint64 expiration_epoch = 3 [json_name = "expirationEpoch", deprecated = true];
|
|
||||||
|
|
||||||
// Strictly ordered list of storage group member objects. Members MUST be unique
|
|
||||||
repeated neo.fs.v2.refs.ObjectID members = 4 [json_name = "members"];
|
|
||||||
}
|
|
Loading…
Reference in a new issue