From 487b84e6144ef9e0b542afb57192c7c59745b6bb Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 5 Aug 2020 11:41:51 +0300 Subject: [PATCH] [#28] storagegroup: Measure lifetime in NeoFS epochs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In previous version of the format storage group lifetime was measured in two epoch times: NeoFS and Unix. Since unix is not processed in the system, this commit narrows the time point of storage group expiration to the system epoch number. The storagegroup.StorageGroup.Lifetime message has therefore been deleted as no longer used. Signed-off-by: Leonard Lyubich --- proto-docs/storagegroup.md | 28 +--------------------------- storagegroup/types.proto | 20 ++------------------ 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/proto-docs/storagegroup.md b/proto-docs/storagegroup.md index af34ee3..e1d27ae 100644 --- a/proto-docs/storagegroup.md +++ b/proto-docs/storagegroup.md @@ -7,7 +7,6 @@ - Messages - [StorageGroup](#storagegroup.StorageGroup) - - [StorageGroup.Lifetime](#storagegroup.StorageGroup.Lifetime) - [Scalar Value Types](#scalar-value-types) @@ -33,36 +32,11 @@ | ----- | ---- | ----- | ----------- | | ValidationDataSize | [uint64](#uint64) | | ValidationDataSize is size of the all object's payloads included into storage group | | ValidationHash | [bytes](#bytes) | | ValidationHash is homomorphic hash of all object's payloads included into storage group | -| lifetime | [StorageGroup.Lifetime](#storagegroup.StorageGroup.Lifetime) | | Lifetime is time until storage group is valid | +| ExpirationEpoch | [uint64](#uint64) | | ExpirationEpoch carries last NeoFS epoch number of the storage group lifetime. | | Members | [refs.ObjectID](#refs.ObjectID) | repeated | Members carries the list of identifiers of the object storage group members. The list is strictly ordered. | - - - -### Message StorageGroup.Lifetime - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| unit | [StorageGroup.Lifetime.Unit](#storagegroup.StorageGroup.Lifetime.Unit) | | Unit is lifetime type | -| Value | [int64](#int64) | | Value for lifetime | - - - - -### StorageGroup.Lifetime.Unit - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| Unlimited | 0 | Unlimited set if storage group always valid | -| NeoFSEpoch | 1 | NeoFSEpoch set if storage group is valid until lifetime NeoFS epoch | -| UnixTime | 2 | UnixTime set if storage group is valid until lifetime unix timestamp | - - diff --git a/storagegroup/types.proto b/storagegroup/types.proto index 98604e6..0848ac0 100644 --- a/storagegroup/types.proto +++ b/storagegroup/types.proto @@ -11,24 +11,8 @@ message StorageGroup { // ValidationHash is homomorphic hash of all object's payloads included into storage group bytes ValidationHash = 2; - message Lifetime { - enum Unit { - // Unlimited set if storage group always valid - Unlimited = 0; - // NeoFSEpoch set if storage group is valid until lifetime NeoFS epoch - NeoFSEpoch = 1; - // UnixTime set if storage group is valid until lifetime unix timestamp - UnixTime = 2; - } - - // Unit is lifetime type - Unit unit = 1; - // Value for lifetime - int64 Value = 2; - } - - // Lifetime is time until storage group is valid - Lifetime lifetime = 3; + // ExpirationEpoch carries last NeoFS epoch number of the storage group lifetime. + uint64 ExpirationEpoch = 3; // Members carries the list of identifiers of the object storage group members. // The list is strictly ordered.