Skip to content

Commit

Permalink
[nspcc-dev#202] session: Allow to spread object session to the whole …
Browse files Browse the repository at this point in the history
…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 <leonard@nspcc.ru>
  • Loading branch information
Leonard Lyubich committed Sep 16, 2022
1 parent 4d8dd72 commit 312902a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion session/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}

Expand Down

0 comments on commit 312902a

Please sign in to comment.