|
34 | 34 | - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) |
35 | 35 | - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) |
36 | 36 | - [PlacementPolicy.ECRule](#neo.fs.v2.netmap.PlacementPolicy.ECRule) |
| 37 | + - [PlacementPolicy.Initial](#neo.fs.v2.netmap.PlacementPolicy.Initial) |
37 | 38 | - [Replica](#neo.fs.v2.netmap.Replica) |
38 | 39 | - [Selector](#neo.fs.v2.netmap.Selector) |
39 | 40 |
|
@@ -488,6 +489,7 @@ storage policy definition languages. |
488 | 489 | | filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of named filters to reference in selectors | |
489 | 490 | | subnet_id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | DEPRECATED. Was used for subnetwork ID to select nodes from, currently ignored. | |
490 | 491 | | ec_rules | [PlacementPolicy.ECRule](#neo.fs.v2.netmap.PlacementPolicy.ECRule) | repeated | Erasure coding rules. Limited to 4 items. | |
| 492 | +| initial | [PlacementPolicy.Initial](#neo.fs.v2.netmap.PlacementPolicy.Initial) | | Initial placement rules. | |
491 | 493 |
|
492 | 494 |
|
493 | 495 | <a name="neo.fs.v2.netmap.PlacementPolicy.ECRule"></a> |
@@ -537,6 +539,40 @@ because they have no payload. |
537 | 539 | | selector | [string](#string) | | Name of the linked selector | |
538 | 540 |
|
539 | 541 |
|
| 542 | +<a name="neo.fs.v2.netmap.PlacementPolicy.Initial"></a> |
| 543 | + |
| 544 | +### Message PlacementPolicy.Initial |
| 545 | +Rules applied during initial data placement. |
| 546 | + |
| 547 | +`replica_limits` allows to override `Replica.count` and EC partitions. If |
| 548 | +set, `replica_limits` must have a length equal to the sum of `replicas` |
| 549 | +(`RN`) and `ec_rules` length. Each of first `RN` elements of |
| 550 | +`replica_limits` must be less than or equal to corresponding |
| 551 | +`Replica.count`. The remaining elements must be either 0 (corresponding |
| 552 | +EC rule is skipped) or 1 (done). At least one `replica_limits` element |
| 553 | +must be non-zero. |
| 554 | + |
| 555 | +`max_replicas` allows to limit total number of replicas and EC partitions |
| 556 | +for successful operation. If set, `max_replicas` must not overflow total |
| 557 | +replica limit (`replica_limits` or main ones). |
| 558 | + |
| 559 | +`prefer_local` allows to tell server to try to store `MaxReplicas` |
| 560 | +replicas in locations that include this server. `prefer_local` must be set |
| 561 | +along with `max_replicas` only. |
| 562 | + |
| 563 | +Either `replica_limits` or `max_replicas` must be specified. |
| 564 | + |
| 565 | +Initial policy must not repeat the main one. In particular, policy with |
| 566 | +`replica_limits` equal to main ones only is invalid. |
| 567 | + |
| 568 | + |
| 569 | +| Field | Type | Label | Description | |
| 570 | +| ----- | ---- | ----- | ----------- | |
| 571 | +| replica_limits | [uint32](#uint32) | repeated | Limits on the number of replicas and EC partitions | |
| 572 | +| max_replicas | [uint32](#uint32) | | Maximum total number of replicas | |
| 573 | +| prefer_local | [bool](#bool) | | Flag to prefer local placement over regular one | |
| 574 | + |
| 575 | + |
540 | 576 | <a name="neo.fs.v2.netmap.Replica"></a> |
541 | 577 |
|
542 | 578 | ### Message Replica |
|
0 commit comments