From 3518fc42bdfc2f68c62e6f81bc10d978b5be33e9 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 6 Aug 2020 01:55:40 +0300 Subject: [PATCH] object: Replace Raw flag In previous version of the format RequestMetaHeader, which is included in all requests, contained the boolean flag Raw. However, this option was processed only in object.Head and object.Get rpc. Therefore, this commit strips the field from the request meta header and adds it to the mentioned requests. Signed-off-by: Leonard Lyubich --- object/service.proto | 8 ++++++++ proto-docs/object.md | 2 ++ proto-docs/service.md | 1 - service/meta.proto | 2 -- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/object/service.proto b/object/service.proto index d11d24a..573e068 100644 --- a/object/service.proto +++ b/object/service.proto @@ -54,6 +54,10 @@ service Service { message GetRequest { // Address of object (container id + object id) refs.Address Address = 1; + // Raw carries the raw option flag of the request. + // Raw request is sent to receive only the objects + // that are physically stored on the server. + bool Raw = 2; // RequestMetaHeader contains information about request meta headers (should be embedded into message) service.RequestMetaHeader Meta = 98; // RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) @@ -122,6 +126,10 @@ message HeadRequest { refs.Address Address = 1; // FullHeaders can be set true for extended headers in the object bool FullHeaders = 2; + // Raw carries the raw option flag of the request. + // Raw request is sent to receive only the headers of the objects + // that are physically stored on the server. + bool Raw = 3; // RequestMetaHeader contains information about request meta headers (should be embedded into message) service.RequestMetaHeader Meta = 98; // RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) diff --git a/proto-docs/object.md b/proto-docs/object.md index d6c98b4..ce800fc 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -228,6 +228,7 @@ in distributed system. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) | +| Raw | [bool](#bool) | | Raw carries the raw option flag of the request. Raw request is sent to receive only the objects that are physically stored on the server. | | Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) | | Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) | @@ -255,6 +256,7 @@ in distributed system. | ----- | ---- | ----- | ----------- | | Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) | | FullHeaders | [bool](#bool) | | FullHeaders can be set true for extended headers in the object | +| Raw | [bool](#bool) | | Raw carries the raw option flag of the request. Raw request is sent to receive only the headers of the objects that are physically stored on the server. | | Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) | | Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) | diff --git a/proto-docs/service.md b/proto-docs/service.md index 72043c5..961f38e 100644 --- a/proto-docs/service.md +++ b/proto-docs/service.md @@ -72,7 +72,6 @@ RequestMetaHeader contains information about request meta headers | TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every NeoFS Node | | Epoch | [uint64](#uint64) | | Epoch for user can be empty, because node sets epoch to the actual value | | Version | [uint32](#uint32) | | Version defines protocol version TODO: not used for now, should be implemented in future | -| Raw | [bool](#bool) | | Raw determines whether the request is raw or not | | ExtendedHeader | [RequestExtendedHeader](#service.RequestExtendedHeader) | | ExtendedHeader carries extended headers of the request | diff --git a/service/meta.proto b/service/meta.proto index 34304ee..768fc75 100644 --- a/service/meta.proto +++ b/service/meta.proto @@ -13,8 +13,6 @@ message RequestMetaHeader { // Version defines protocol version // TODO: not used for now, should be implemented in future uint32 Version = 3; - // Raw determines whether the request is raw or not - bool Raw = 4; // ExtendedHeader carries extended headers of the request RequestExtendedHeader ExtendedHeader = 5; }