From c51f4cd314b229e0b71b454cdef79b2d999b3147 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 26 Jan 2021 21:22:39 +0300 Subject: [PATCH] [#122] container: Add epoch field to size announcement Nodes aggregate size estimation based on container id and epoch number. Estimations are not valid forever. Signed-off-by: Alex Vanin --- container/service.proto | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/container/service.proto b/container/service.proto index 9869478..5e4295b 100644 --- a/container/service.proto +++ b/container/service.proto @@ -318,12 +318,15 @@ message AnnounceUsedSpaceRequest { message Body { // Announcement contains used space information about single container. message Announcement { - // Identifier of the container - neo.fs.v2.refs.ContainerID container_id = 1; + // Epoch number for which container size estimation was produced. + uint64 epoch = 1; - // used_space is a sum of object payused space sizes of specified + // Identifier of the container. + neo.fs.v2.refs.ContainerID container_id = 2; + + // Used space is a sum of object payload sizes of specified // container, stored in the node. It must not include inhumed objects. - uint64 used_space = 2; + uint64 used_space = 3; } // List of announcements. If nodes share several containers, then