Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netmap: add some sane limits to rep/cbf #317

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions netmap/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ message Selector {
// selector set, the root bucket containing all possible nodes will be used by
// default.
message Replica {
// How many object replicas to put
// How many object replicas to put. Limited to 8.
uint32 count = 1 [json_name = "count"];

// Named selector bucket to put replicas
Expand All @@ -109,11 +109,13 @@ message Replica {
// storage policy definition languages.
message PlacementPolicy {
// Rules to set number of object replicas and place each one into a named
// bucket
// bucket. Limited to 256 items.
repeated Replica replicas = 1 [json_name = "replicas"];

// Container backup factor controls how deep NeoFS will search for nodes
// alternatives to include into container's nodes subset
// Container backup factor (CBF) controls how deep NeoFS will search for
// alternative nodes to include into container's nodes subset. In total,
// the number of container nodes is Selector (used by Replica) count
// times CBF. This number is limited to 64 per-Replica and 512 overall.
uint32 container_backup_factor = 2 [json_name = "containerBackupFactor"];

// Set of Selectors to form the container's nodes subset
Expand Down
6 changes: 3 additions & 3 deletions proto-docs/netmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ storage policy definition languages.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| replicas | [Replica](#neo.fs.v2.netmap.Replica) | repeated | Rules to set number of object replicas and place each one into a named bucket |
| container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS will search for nodes alternatives to include into container's nodes subset |
| replicas | [Replica](#neo.fs.v2.netmap.Replica) | repeated | Rules to set number of object replicas and place each one into a named bucket. Limited to 256 items. |
| container_backup_factor | [uint32](#uint32) | | Container backup factor (CBF) controls how deep NeoFS will search for alternative nodes to include into container's nodes subset. In total, the number of container nodes is Selector (used by Replica) count times CBF. This number is limited to 64 per-Replica and 512 overall. |
| 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) | | DEPRECATED. Was used for subnetwork ID to select nodes from, currently ignored. |
Expand All @@ -497,7 +497,7 @@ default.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| count | [uint32](#uint32) | | How many object replicas to put |
| count | [uint32](#uint32) | | How many object replicas to put. Limited to 8. |
| selector | [string](#string) | | Named selector bucket to put replicas |


Expand Down
Loading