From fc79cd18cc8eea74f12fdbcdbb8dd74b2c259e0a Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 21 Feb 2022 18:58:34 +0300 Subject: [PATCH] [#190] status: Add `OBJECT_ALREADY_REMOVED` code Add `OBJECT_ALREADY_REMOVED` value to `Object` enumeration. Return this status from object GET/HEAD/RANGE operations. Signed-off-by: Leonard Lyubich --- object/service.proto | 12 +++++++++--- status/types.proto | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/object/service.proto b/object/service.proto index d3713ec..061050f 100644 --- a/object/service.proto +++ b/object/service.proto @@ -30,7 +30,9 @@ service ObjectService { // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): // object not found in container; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // provided session token has expired; + // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): + // the requested object has been marked as deleted. rpc Get(GetRequest) returns (stream GetResponse); // Put the object into container. Request uses gRPC stream. First message @@ -93,7 +95,9 @@ service ObjectService { // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): // object not found in container; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // provided session token has expired; + // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): + // the requested object has been marked as deleted. rpc Head(HeadRequest) returns (HeadResponse); // Search objects in container. Search query allows to match by Object @@ -128,7 +132,9 @@ service ObjectService { // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): // object not found in container; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // provided session token has expired; + // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): + // the requested object has been marked as deleted. rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); // Returns homomorphic or regular hash of object's payload range after diff --git a/status/types.proto b/status/types.proto index f64d585..25645a0 100644 --- a/status/types.proto +++ b/status/types.proto @@ -112,6 +112,9 @@ enum Object { // [**2051**] Locking an object with a non-REGULAR type rejected. LOCK_NON_REGULAR_OBJECT = 3; + + // [**2052**] Object has been marked deleted. + OBJECT_ALREADY_REMOVED = 4; } // Section of statuses for container-related operations.