From d6090eb2fc6fbdb401f22ec471fffb1015d67aca Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 16 Sep 2022 10:56:56 +0400 Subject: [PATCH] [#202] session: Allow to spread object session to the whole container Object sessions for `PUT` and `SEARCH` ops are spread to the whole container due to op semantics. Sometimes it is convenient to spread the session to all objects of the container for other operations. Thus, object sessions for the whole container can be unified. Modify docs of `ObjectSessionContext.address` field: * require `container_id` field to be correctly set; * require `object_id` field to be correctly field if set; * allow `object_id` field to be unset and make this case equivalent to the container-global session. Signed-off-by: Leonard Lyubich --- session/types.proto | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/session/types.proto b/session/types.proto index 27fae8b..099b7d5 100644 --- a/session/types.proto +++ b/session/types.proto @@ -40,7 +40,13 @@ message ObjectSessionContext { // Type of request for which the token is issued Verb verb = 1 [json_name = "verb"]; - // Related Object address + // Objects involved in the session. `address` MUST be set. + // `container_id` field indicates which container the session is spread to. + // `container_id` MUST be correctly filled and set. + // `object_id` field indicates which objects in the specified container the + // session is spread to. `object_id` MUST be correctly filled or unset. + // If `object_id` field is set, then the session applies only to this object, + // otherwise, to all objects of the specified container. neo.fs.v2.refs.Address address = 2 [json_name = "address"]; }