From e8ff3ff689b8f2fcb6fbad59d9850777d61f7314 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 22 Feb 2024 13:53:01 +0400 Subject: [PATCH] session: Purge epoch headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously added `__NEOFS__NETMAP*` X-headers did not justify themselves: - no one has ever used them; - even if you try, it’s not clear how to work with them. Data users operate with containers and objects, they are unaware and uninterested in system time details. If an object is available, system must be able to respond to them. Where and when exactly to look for data is best known only to the storage system itself. Closes #282. Signed-off-by: Leonard Lyubich --- CHANGELOG.md | 1 + object/service.proto | 38 -------------------------------------- proto-docs/object.md | 38 -------------------------------------- proto-docs/session.md | 14 ++------------ session/types.proto | 14 ++------------ 5 files changed, 5 insertions(+), 100 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45bd16..4a12f84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Split ID is deprecated, the first child part is used instead and is known to the other parts (#283) ### Removed +- X-headers `__NEOFS__NETMAP_EPOCH` and `__NEOFS__NETMAP_LOOKUP_DEPTH` (#282) ### Deprecated diff --git a/object/service.proto b/object/service.proto index 2119e7a..c55e21d 100644 --- a/object/service.proto +++ b/object/service.proto @@ -20,17 +20,6 @@ service ObjectService { // be restored by concatenation of object message payload and all chunks // keeping the receiving order. // - // Extended headers can change `Get` behaviour: - // * __NEOFS__NETMAP_EPOCH \ - // Will use the requsted version of Network Map for object placement - // calculation. - // * __NEOFS__NETMAP_LOOKUP_DEPTH \ - // Will try older versions (starting from `__NEOFS__NETMAP_EPOCH` if specified or - // the latest one otherwise) of Network Map to find an object until the depth - // limit is reached. - // - // Please refer to detailed `XHeader` description. - // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // object has been successfully read; @@ -54,13 +43,6 @@ service ObjectService { // object payload. All messages, except first one, SHOULD be payload chunks. // Chunk messages SHOULD be sent in the direct order of fragmentation. // - // Extended headers can change `Put` behaviour: - // * __NEOFS__NETMAP_EPOCH \ - // Will use the requsted version of Network Map for object placement - // calculation. - // - // Please refer to detailed `XHeader` description. - // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // object has been successfully saved in the container; @@ -161,16 +143,6 @@ service ObjectService { // restored by concatenation of all received payload chunks keeping the receiving // order. // - // Extended headers can change `GetRange` behaviour: - // * __NEOFS__NETMAP_EPOCH \ - // Will use the requsted version of Network Map for object placement - // calculation. - // * __NEOFS__NETMAP_LOOKUP_DEPTH \ - // Will try older versions of Network Map to find an object until the depth - // limit is reached. - // - // Please refer to detailed `XHeader` description. - // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // data range of the object payload has been successfully read; @@ -194,16 +166,6 @@ service ObjectService { // length) tuples. Hashes order in response corresponds to the ranges order in // the request. Note that hash is calculated for XORed data. // - // Extended headers can change `GetRangeHash` behaviour: - // * __NEOFS__NETMAP_EPOCH \ - // Will use the requsted version of Network Map for object placement - // calculation. - // * __NEOFS__NETMAP_LOOKUP_DEPTH \ - // Will try older versions of Network Map to find an object until the depth - // limit is reached. - // - // Please refer to detailed `XHeader` description. - // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // data range of the object payload has been successfully hashed; diff --git a/proto-docs/object.md b/proto-docs/object.md index 9ee7d17..e9b5230 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -95,17 +95,6 @@ messages, except the first one, carry payload chunks. The requested object can be restored by concatenation of object message payload and all chunks keeping the receiving order. -Extended headers can change `Get` behaviour: -* __NEOFS__NETMAP_EPOCH \ - Will use the requsted version of Network Map for object placement - calculation. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ - Will try older versions (starting from `__NEOFS__NETMAP_EPOCH` if specified or - the latest one otherwise) of Network Map to find an object until the depth - limit is reached. - -Please refer to detailed `XHeader` description. - Statuses: - **OK** (0, SECTION_SUCCESS): \ object has been successfully read; @@ -133,13 +122,6 @@ session package). Chunk messages are considered by server as a part of an object payload. All messages, except first one, SHOULD be payload chunks. Chunk messages SHOULD be sent in the direct order of fragmentation. -Extended headers can change `Put` behaviour: -* __NEOFS__NETMAP_EPOCH \ - Will use the requsted version of Network Map for object placement - calculation. - -Please refer to detailed `XHeader` description. - Statuses: - **OK** (0, SECTION_SUCCESS): \ object has been successfully saved in the container; @@ -256,16 +238,6 @@ Like in `Get` method, the response uses gRPC stream. Requested range can be restored by concatenation of all received payload chunks keeping the receiving order. -Extended headers can change `GetRange` behaviour: -* __NEOFS__NETMAP_EPOCH \ - Will use the requsted version of Network Map for object placement - calculation. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ - Will try older versions of Network Map to find an object until the depth - limit is reached. - -Please refer to detailed `XHeader` description. - Statuses: - **OK** (0, SECTION_SUCCESS): \ data range of the object payload has been successfully read; @@ -293,16 +265,6 @@ applying XOR operation with the provided `salt`. Ranges are set of (offset, length) tuples. Hashes order in response corresponds to the ranges order in the request. Note that hash is calculated for XORed data. -Extended headers can change `GetRangeHash` behaviour: -* __NEOFS__NETMAP_EPOCH \ - Will use the requsted version of Network Map for object placement - calculation. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ - Will try older versions of Network Map to find an object until the depth - limit is reached. - -Please refer to detailed `XHeader` description. - Statuses: - **OK** (0, SECTION_SUCCESS): \ data range of the object payload has been successfully hashed; diff --git a/proto-docs/session.md b/proto-docs/session.md index 2cdfd1e..7fa1629 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -285,18 +285,8 @@ Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or Responses with duplicated header names or headers with empty values will be considered invalid. -There are some "well-known" headers starting with `__NEOFS__` prefix that -affect system behaviour: - -* __NEOFS__NETMAP_EPOCH \ - Netmap epoch to use for object placement calculation. The `value` is string - encoded `uint64` in decimal presentation. If set to '0' or not set, the - current epoch only will be used. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ - If object can't be found using current epoch's netmap, this header limits - how many past epochs the node can look up through. The `value` is string - encoded `uint64` in decimal presentation. If set to '0' or not set, only the - current epoch will be used. +Headers with `__NEOFS__` prefix are reserved for system needs, regular clients +should avoid using them. | Field | Type | Label | Description | diff --git a/session/types.proto b/session/types.proto index d00e99f..3e8b598 100644 --- a/session/types.proto +++ b/session/types.proto @@ -137,18 +137,8 @@ message SessionToken { // Responses with duplicated header names or headers with empty values will be // considered invalid. // -// There are some "well-known" headers starting with `__NEOFS__` prefix that -// affect system behaviour: -// -// * __NEOFS__NETMAP_EPOCH \ -// Netmap epoch to use for object placement calculation. The `value` is string -// encoded `uint64` in decimal presentation. If set to '0' or not set, the -// current epoch only will be used. -// * __NEOFS__NETMAP_LOOKUP_DEPTH \ -// If object can't be found using current epoch's netmap, this header limits -// how many past epochs the node can look up through. The `value` is string -// encoded `uint64` in decimal presentation. If set to '0' or not set, only the -// current epoch will be used. +// Headers with `__NEOFS__` prefix are reserved for system needs, regular clients +// should avoid using them. message XHeader { // Key of the X-Header string key = 1 [json_name = "key"];