forked from TrueCloudLab/frostfs-node
[#539] getsvc: Use buffer to assemble object
To reduce memory consumption. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
32c77f3a23
commit
286242cad0
4 changed files with 20 additions and 7 deletions
|
@ -113,8 +113,9 @@ func (r *request) HeadObject(ctx context.Context, id oid.ID) (*objectSDK.Object,
|
|||
return w.Object(), nil
|
||||
}
|
||||
|
||||
func (r *request) GetObject(ctx context.Context, id oid.ID, rng *objectSDK.Range) (*objectSDK.Object, error) {
|
||||
func (r *request) GetObject(ctx context.Context, id oid.ID, rng *objectSDK.Range, payloadBuffer []byte) (*objectSDK.Object, error) {
|
||||
w := NewSimpleObjectWriter()
|
||||
w.SetPayloadBuffer(payloadBuffer)
|
||||
|
||||
p := r.prm
|
||||
p.common = p.common.WithLocalOnly(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue