From 254b893c5c35403ad7c4bb47f0760f5020081e19 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sat, 16 Dec 2023 18:53:30 +0300 Subject: [PATCH] *: deprecate subnets, fix #261 Signed-off-by: Roman Khimov --- CHANGELOG.md | 3 +++ container/types.proto | 4 ++-- netmap/types.proto | 14 +++++--------- proto-docs/container.md | 4 ++-- proto-docs/netmap.md | 10 +++------- proto-docs/refs.md | 2 ++ proto-docs/subnet.md | 2 ++ refs/types.proto | 2 ++ subnet/types.proto | 2 ++ 9 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43fda1f..6d998b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ ### Removed - Redundant object system attribute `__NEOFS__UPLOAD_ID` (#271) +### Deprecated +- Subnets (#261) + ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) ### Added diff --git a/container/types.proto b/container/types.proto index a710a4b..c2d3ad2 100644 --- a/container/types.proto +++ b/container/types.proto @@ -38,8 +38,8 @@ message Container { // There are some "well-known" attributes affecting system behaviour: // // * __NEOFS__SUBNET \ - // String ID of a container's storage subnet. Any container can be attached to - // one subnet only. + // DEPRECATED. Was used for a string ID of a container's storage subnet. + // Currently doesn't affect anything. // * __NEOFS__NAME \ // String of a human-friendly container name registered as a domain in // NNS contract. diff --git a/netmap/types.proto b/netmap/types.proto index 9410d01..ffeab01 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -122,9 +122,9 @@ message PlacementPolicy { // List of named filters to reference in selectors repeated Filter filters = 4 [json_name = "filters"]; - // Subnetwork ID to select nodes from. Zero subnet (default) represents - // all of the nodes which didn't explicitly opt out of membership. - refs.SubnetID subnet_id = 5 [json_name = "subnetId"]; + // DEPRECATED. Was used for subnetwork ID to select nodes from, currently + // ignored. + refs.SubnetID subnet_id = 5 [json_name = "subnetId", deprecated = true]; } // NeoFS node description @@ -165,12 +165,8 @@ message NodeInfo { // point delimiter for decimal part. In the Network Map it will be saved as // 64-bit unsigned integer representing number of minimal token fractions. // * __NEOFS__SUBNET_%s \ - // `True` or `False`. Defines if the node is included in the `%s` subnetwork - // or not. `%s` must be an existing subnetwork's ID (non-negative integer number). - // A node can be included in more than one subnetwork and, therefore, can contain - // more than one subnet attribute. A missing attribute is equivalent to the - // presence of the attribute with `False` value (except default zero subnetwork - // (with `%s` == 0) for which missing attribute means inclusion in that network). + // DEPRECATED. Defined if the node is included in the `%s` subnetwork + // or not. Currently ignored. // * UN-LOCODE \ // Node's geographic location in // [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) diff --git a/proto-docs/container.md b/proto-docs/container.md index 176da6c..6bd2879 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -591,8 +591,8 @@ values will be considered invalid. There are some "well-known" attributes affecting system behaviour: * __NEOFS__SUBNET \ - String ID of a container's storage subnet. Any container can be attached to - one subnet only. + DEPRECATED. Was used for a string ID of a container's storage subnet. + Currently doesn't affect anything. * __NEOFS__NAME \ String of a human-friendly container name registered as a domain in NNS contract. diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index a99ad42..2ed59bc 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -407,12 +407,8 @@ explicitly set: point delimiter for decimal part. In the Network Map it will be saved as 64-bit unsigned integer representing number of minimal token fractions. * __NEOFS__SUBNET_%s \ - `True` or `False`. Defines if the node is included in the `%s` subnetwork - or not. `%s` must be an existing subnetwork's ID (non-negative integer number). - A node can be included in more than one subnetwork and, therefore, can contain - more than one subnet attribute. A missing attribute is equivalent to the - presence of the attribute with `False` value (except default zero subnetwork - (with `%s` == 0) for which missing attribute means inclusion in that network). + DEPRECATED. Defined if the node is included in the `%s` subnetwork + or not. Currently ignored. * UN-LOCODE \ Node's geographic location in [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) @@ -488,7 +484,7 @@ storage policy definition languages. | container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS will search for nodes alternatives to include into container's nodes subset | | selectors | [Selector](#neo.fs.v2.netmap.Selector) | repeated | Set of Selectors to form the container's nodes subset | | filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of named filters to reference in selectors | -| subnet_id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | Subnetwork ID to select nodes from. Zero subnet (default) represents all of the nodes which didn't explicitly opt out of membership. | +| subnet_id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | DEPRECATED. Was used for subnetwork ID to select nodes from, currently ignored. | diff --git a/proto-docs/refs.md b/proto-docs/refs.md index 651822f..18d32c4 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -173,6 +173,8 @@ String representation of a value is base-10 integer. JSON representation is an object containing a single `value` number field. +DEPRECATED. Kept for compatibility only. + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | diff --git a/proto-docs/subnet.md b/proto-docs/subnet.md index a766dc6..a31183a 100644 --- a/proto-docs/subnet.md +++ b/proto-docs/subnet.md @@ -27,6 +27,8 @@ ### Message SubnetInfo NeoFS subnetwork description +DEPRECATED. Ignored and kept for compatibility only. + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | diff --git a/refs/types.proto b/refs/types.proto index 729fc1b..2986792 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -82,6 +82,8 @@ message OwnerID { // String representation of a value is base-10 integer. // // JSON representation is an object containing a single `value` number field. +// +// DEPRECATED. Kept for compatibility only. message SubnetID { // 4-byte integer subnetwork identifier. fixed32 value = 1 [json_name = "value"]; diff --git a/subnet/types.proto b/subnet/types.proto index aa69bba..b2c5571 100644 --- a/subnet/types.proto +++ b/subnet/types.proto @@ -8,6 +8,8 @@ option csharp_namespace = "Neo.FileStorage.API.Subnet"; import "refs/types.proto"; // NeoFS subnetwork description +// +// DEPRECATED. Ignored and kept for compatibility only. message SubnetInfo { // Unique subnet identifier. Missing ID is // equivalent to zero (default subnetwork) ID.