From cbc038f84e7e8bf398bcc03ab53527c6b8cd18d1 Mon Sep 17 00:00:00 2001
From: Pavel Karpy
Date: Thu, 6 Apr 2023 00:44:42 +0300
Subject: [PATCH] [#17] object: Allow set `copy_number` for every placement
vector
Signed-off-by: Pavel Karpy
---
object/service.proto | 12 ++++++++++--
proto-docs/object.md | 2 +-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/object/service.proto b/object/service.proto
index 17be2c1..1d08ff5 100644
--- a/object/service.proto
+++ b/object/service.proto
@@ -311,9 +311,17 @@ message PutRequest {
// Object's Header
Header header = 3;
- // Number of the object copies to store within the RPC call. By default
+ // Number of copies of the object to store within the RPC call. By default,
// object is processed according to the container's placement policy.
- uint32 copies_number = 4;
+ // Can be one of:
+ // 1. A single number; applied to the whole request and is treated as
+ // a minimal number of nodes that must store an object to complete the
+ // request successfully.
+ // 2. An ordered array; every number is treated as a minimal number of
+ // nodes in a corresponding placement vector that must store an object
+ // to complete the request successfully. The length MUST equal the placement
+ // vectors number, otherwise request is considered malformed.
+ repeated uint32 copies_number = 4;
}
// Single message in the request stream.
oneof object_part {
diff --git a/proto-docs/object.md b/proto-docs/object.md
index b25fa57..8b5f460 100644
--- a/proto-docs/object.md
+++ b/proto-docs/object.md
@@ -658,7 +658,7 @@ are not set, they will be calculated by a peer node.
| object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | ObjectID if available. |
| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Object signature if available |
| header | [Header](#neo.fs.v2.object.Header) | | Object's Header |
-| copies_number | [uint32](#uint32) | | Number of the object copies to store within the RPC call. By default object is processed according to the container's placement policy. |
+| copies_number | [uint32](#uint32) | repeated | Number of copies of the object to store within the RPC call. By default, object is processed according to the container's placement policy. Can be one of: 1. A single number; applied to the whole request and is treated as a minimal number of nodes that must store an object to complete the request successfully. 2. An ordered array; every number is treated as a minimal number of nodes in a corresponding placement vector that must store an object to complete the request successfully. The length MUST equal the placement vectors number, otherwise request is considered malformed. |