From 67ecea75076cecd4623119ca4c6ead75c22a43ee Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 5 Aug 2020 12:00:47 +0300 Subject: [PATCH] [#28] object: Move storage group information In previous version of the format storage group information was stored in completely in the dedicated header field. However, having a header field instead of storing it in a payload is not justified, since it is used only to check the presence in the object. Based on this, this commit defines a message for marking the object as the custodian of information about the storage group and changes the type of field StorageGroup to it. Information about the storage group will be stored serialized in the payload of the objects marked in this way Signed-off-by: Leonard Lyubich --- object/types.proto | 9 ++++++--- proto-docs/object.md | 10 +++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/object/types.proto b/object/types.proto index 4a11b82..3bab3b1 100644 --- a/object/types.proto +++ b/object/types.proto @@ -7,7 +7,6 @@ option csharp_namespace = "NeoFS.API.Object"; import "refs/types.proto"; import "service/verify.proto"; -import "storagegroup/types.proto"; // Header groups the information about the NeoFS object. message Header { @@ -88,8 +87,12 @@ message Header { // HomomorphicHash carries homomorphic hash of the object payload. bytes HomomorphicHash = 5; - // StorageGroup carries information about the NeoFS storage group. - storagegroup.StorageGroup StorageGroup = 6; + // StorageGroup groups meta information about a storage group. + message StorageGroup { + } + + // StorageGroup marks an object containing information about a storage group. + StorageGroup storageGroup = 6; // Split groups information about spawning the object through a payload splitting. message Split { diff --git a/proto-docs/object.md b/proto-docs/object.md index 9dc303a..29d9955 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -34,6 +34,7 @@ - [Header.Extended.Attribute](#object.Header.Extended.Attribute) - [Header.Extended.Integrity](#object.Header.Extended.Integrity) - [Header.Extended.Split](#object.Header.Extended.Split) + - [Header.Extended.StorageGroup](#object.Header.Extended.StorageGroup) - [Header.Extended.Tombstone](#object.Header.Extended.Tombstone) - [Header.Main](#object.Header.Main) - [Object](#object.Object) @@ -386,7 +387,7 @@ the NeoFS sub-systems. | CreationEpoch | [uint64](#uint64) | | CreationEpoch carries number of NeoFS epoch on which the object was created. | | tombstone | [Header.Extended.Tombstone](#object.Header.Extended.Tombstone) | | Tombstone marks the object to be deleted. | | HomomorphicHash | [bytes](#bytes) | | HomomorphicHash carries homomorphic hash of the object payload. | -| StorageGroup | [storagegroup.StorageGroup](#storagegroup.StorageGroup) | | StorageGroup carries information about the NeoFS storage group. | +| storageGroup | [Header.Extended.StorageGroup](#object.Header.Extended.StorageGroup) | | StorageGroup marks an object containing information about a storage group. | | split | [Header.Extended.Split](#object.Header.Extended.Split) | | Split carries the position of the object in the split hierarchy. | @@ -432,6 +433,13 @@ Split groups information about spawning the object through a payload splitting. | Origin | [Header](#object.Header) | | Origin carries the header of the origin object. | + + +### Message Header.Extended.StorageGroup +StorageGroup groups meta information about a storage group. + + + ### Message Header.Extended.Tombstone