Skip to content

Commit

Permalink
session: Purge epoch headers
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 22, 2024
1 parent dcead71 commit c4d4f88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
14 changes: 2 additions & 12 deletions proto-docs/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
14 changes: 2 additions & 12 deletions session/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down

0 comments on commit c4d4f88

Please sign in to comment.