Skip to content

Commit

Permalink
session: Mark epoch headers as deprecated
Browse files Browse the repository at this point in the history
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 <leonard@morphbits.io>
  • Loading branch information
cthulhu-rider committed Feb 26, 2024
1 parent dcead71 commit 7bcf1b7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
### Removed

### Deprecated
- X-headers `__NEOFS__NETMAP_EPOCH` and `__NEOFS__NETMAP_LOOKUP_DEPTH` (#282)

## [2.15.0] - 2024-01-30

Expand Down
16 changes: 8 additions & 8 deletions object/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ service ObjectService {
// Extended headers can change `Get` behaviour:
// * __NEOFS__NETMAP_EPOCH \
// Will use the requsted version of Network Map for object placement
// calculation.
// calculation. DEPRECATED: header ignored by servers.
// * __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.
// limit is reached. DEPRECATED: header ignored by servers.
//
// Please refer to detailed `XHeader` description.
//
Expand Down Expand Up @@ -57,7 +57,7 @@ service ObjectService {
// Extended headers can change `Put` behaviour:
// * __NEOFS__NETMAP_EPOCH \
// Will use the requsted version of Network Map for object placement
// calculation.
// calculation. DEPRECATED: header ignored by servers.
//
// Please refer to detailed `XHeader` description.
//
Expand Down Expand Up @@ -88,7 +88,7 @@ service ObjectService {
// Extended headers can change `Delete` behaviour:
// * __NEOFS__NETMAP_EPOCH \
// Will use the requsted version of Network Map for object placement
// calculation.
// calculation. DEPRECATED: header ignored by servers.
//
// Please refer to detailed `XHeader` description.
//
Expand Down Expand Up @@ -164,10 +164,10 @@ service ObjectService {
// Extended headers can change `GetRange` behaviour:
// * __NEOFS__NETMAP_EPOCH \
// Will use the requsted version of Network Map for object placement
// calculation.
// calculation. DEPRECATED: header ignored by servers.
// * __NEOFS__NETMAP_LOOKUP_DEPTH \
// Will try older versions of Network Map to find an object until the depth
// limit is reached.
// limit is reached. DEPRECATED: header ignored by servers.
//
// Please refer to detailed `XHeader` description.
//
Expand Down Expand Up @@ -197,10 +197,10 @@ service ObjectService {
// Extended headers can change `GetRangeHash` behaviour:
// * __NEOFS__NETMAP_EPOCH \
// Will use the requsted version of Network Map for object placement
// calculation.
// calculation. DEPRECATED: header ignored by servers.
// * __NEOFS__NETMAP_LOOKUP_DEPTH \
// Will try older versions of Network Map to find an object until the depth
// limit is reached.
// limit is reached. DEPRECATED: header ignored by servers.
//
// Please refer to detailed `XHeader` description.
//
Expand Down
16 changes: 8 additions & 8 deletions proto-docs/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ 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.
calculation. DEPRECATED: header ignored by servers.
* __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.
limit is reached. DEPRECATED: header ignored by servers.

Please refer to detailed `XHeader` description.

Expand Down Expand Up @@ -136,7 +136,7 @@ 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.
calculation. DEPRECATED: header ignored by servers.

Please refer to detailed `XHeader` description.

Expand Down Expand Up @@ -171,7 +171,7 @@ guarantee. Object will be marked for removal and deleted eventually.
Extended headers can change `Delete` behaviour:
* __NEOFS__NETMAP_EPOCH \
Will use the requsted version of Network Map for object placement
calculation.
calculation. DEPRECATED: header ignored by servers.

Please refer to detailed `XHeader` description.

Expand Down Expand Up @@ -259,10 +259,10 @@ order.
Extended headers can change `GetRange` behaviour:
* __NEOFS__NETMAP_EPOCH \
Will use the requsted version of Network Map for object placement
calculation.
calculation. DEPRECATED: header ignored by servers.
* __NEOFS__NETMAP_LOOKUP_DEPTH \
Will try older versions of Network Map to find an object until the depth
limit is reached.
limit is reached. DEPRECATED: header ignored by servers.

Please refer to detailed `XHeader` description.

Expand Down Expand Up @@ -296,10 +296,10 @@ 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.
calculation. DEPRECATED: header ignored by servers.
* __NEOFS__NETMAP_LOOKUP_DEPTH \
Will try older versions of Network Map to find an object until the depth
limit is reached.
limit is reached. DEPRECATED: header ignored by servers.

Please refer to detailed `XHeader` description.

Expand Down
4 changes: 2 additions & 2 deletions proto-docs/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ 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.
current epoch only will be used. DEPRECATED: header ignored by servers.
* __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.
current epoch will be used. DEPRECATED: header ignored by servers.


| Field | Type | Label | Description |
Expand Down
4 changes: 2 additions & 2 deletions session/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ message SessionToken {
// * __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.
// current epoch only will be used. DEPRECATED: header ignored by servers.
// * __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.
// current epoch will be used. DEPRECATED: header ignored by servers.
message XHeader {
// Key of the X-Header
string key = 1 [json_name = "key"];
Expand Down

0 comments on commit 7bcf1b7

Please sign in to comment.