Add PutSingle RPC #31
Labels
No labels
P0
P1
P2
P3
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api#31
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-api:feat/put-single"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In #9 decided to create new Put method to save prepared object.
@ -709,0 +746,4 @@
// PUT Single request body
message Body {
// Object ID
neo.fs.v2.refs.ObjectID object_id = 1;
So, basically,
Object
+copies_number
?Why do we have 4 separate fields instead of an
Object
?fixed
40f630e0b6
to656253d8c1
656253d8c1
tod6bb998e3a
WIP: Add PutSingle RPCto Add PutSingle RPC@ -229,2 +229,4 @@
// provided session token has expired.
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
// Put the prepared object into container. Request uses gRPC stream.
This is a bit misleading; the RPC is unary.
fixed
@ -231,0 +231,4 @@
// Put the prepared object into container. Request uses gRPC stream.
// `ContainerID`, `ObjectID` and `OwnerID` of an object
// SHOULD be set. Session token SHOULD be obtained before `PUT SINGLE` operation (see
nit: not sure what kind of rules we have, but I would rather use
MUST
instead ofSHOULD
for these things.SHOULD
sounds like it's optional.fixed
@ -231,0 +237,4 @@
// Extended headers can change `Put` behaviour:
// * [ __SYSTEM__NETMAP_EPOCH \
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \
// Will use the requsted version of Network Map for object placement
s/requsted/requested
fixed
@ -707,2 +741,4 @@
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
// Object PUT Single request
many of these comments seem superfluous. They don't add any valuable info to the declaration itself.
Well, i think, this is a tradition. And traditions should be respected.
The comments could be useful for doc generation.
Agree with @dstepanov-yadro , let's preserve the style.
Could make alterations altogether in a separate task.
d6bb998e3a
toebbf395228
@ -709,0 +771,4 @@
// Object PUT Single response
message PutSingleResponse {
// PUT Single Object response body
message Body {
PutSingle requires object id passed in the request. So there is nothing to return, but
Body
is defined like in other models.ebbf395228
toc3be3c160a
@ -231,0 +259,4 @@
// (for trusted object preparation) session private key does not exist or has
// been deleted;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired.
Token failure codes are not relevant now.
frostfs-node checks session token for every request: https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/services/object/acl/v2/service.go#L243
c3be3c160a
to5aaa89dbf5
@ -230,1 +230,4 @@
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
// Put the prepared object into container.
// `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` of an object MUST be set.
PayloadHash is also required.
PayloadSize is required for streaming Put, because we need to check planned and actual size, so PutSinle doesn't require this field i think.
I believe it requires -- this is a part of correctly formed object.
Ok, added Payload len to required
5aaa89dbf5
to46fcaf9e21
46fcaf9e21
tof2a60016ab