From f2337baedc1613701e64e5fc65beac16714d57bc Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Sun, 21 Feb 2021 10:20:04 +0300 Subject: [PATCH] [#401] control: Add RPC to mark objects to be removed from the node There is a need to define storage node's interface to remove objects from the local storage. Define `DropObjects` RPC in `ControlService`. Define `DropObjectsRequest` / `DropObjectsResponse` structure of the request / response messages. Signed-off-by: Leonard Lyubich --- pkg/services/control/service.proto | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pkg/services/control/service.proto b/pkg/services/control/service.proto index 2565a9df8..f6c82656d 100644 --- a/pkg/services/control/service.proto +++ b/pkg/services/control/service.proto @@ -16,6 +16,9 @@ service ControlService { // Sets status of the storage node in NeoFS network map. rpc SetNetmapStatus (SetNetmapStatusRequest) returns (SetNetmapStatusResponse); + + // Mark objects to be removed from node's local object storage. + rpc DropObjects (DropObjectsRequest) returns (DropObjectsResponse); } // Health check request. @@ -104,3 +107,32 @@ message SetNetmapStatusResponse { // Body signature. Signature signature = 2; } + +// Request to drop the objects. +message DropObjectsRequest { + // Request body structure. + message Body { + // List of object addresses to be removed. + // in NeoFS API binary format. + repeated bytes address_list = 1; + } + + // Body of the request message. + Body body = 1; + + // Body signature. + Signature signature = 2; +} + +// Response to request to drop the objects. +message DropObjectsResponse { + // Response body structure. + message Body { + } + + // Body of the response message. + Body body = 1; + + // Body signature. + Signature signature = 2; +}