forked from TrueCloudLab/frostfs-sdk-go
[#147] pool: Limit buffer length by 3MB in PutObject
In previous implementation we wrote up to 4KB payload chunk per-call. This led to sending a large number of messages with a large amount of payload. Increase buffer length limit to 3MB. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
035f1d5667
commit
29c057272c
1 changed files with 1 additions and 1 deletions
|
@ -752,7 +752,7 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read
|
|||
}
|
||||
|
||||
if payload != nil {
|
||||
const defaultBufferSizePut = 4096 // configure?
|
||||
const defaultBufferSizePut = 3 << 20 // configure?
|
||||
|
||||
if sz == 0 || sz > defaultBufferSizePut {
|
||||
sz = defaultBufferSizePut
|
||||
|
|
Loading…
Reference in a new issue