Optimize memory allocations #784

Merged
dstepanov-yadro merged 1 commit from dstepanov-yadro/frostfs-node:feat/object_serialization into master 2024-09-04 19:51:04 +00:00
Showing only changes of commit 20d6132f31 - Show all commits

View file

@ -122,6 +122,7 @@ func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*objec
}
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error) {
req.GetBody().SetMarshalData(nil)
Review

Why do we need this line?

Why do we need this line?
Review

Here we marshal data and store it in PutSingleRequest, so next StableMarshal calls (for signature verification and save to shard) will use already prepared data.

Here we marshal data and store it in PutSingleRequest, so next `StableMarshal` calls (for signature verification and save to shard) will use already prepared data.
if err := s.sigSvc.VerifyRequest(req); err != nil {
resp := new(object.PutSingleResponse)
return resp, s.sigSvc.SignResponse(resp, err)