[#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>remotes/fyrchik/fix-lint
parent
035f1d5667
commit
29c057272c
|
@ -752,7 +752,7 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read
|
||||||
}
|
}
|
||||||
|
|
||||||
if payload != nil {
|
if payload != nil {
|
||||||
const defaultBufferSizePut = 4096 // configure?
|
const defaultBufferSizePut = 3 << 20 // configure?
|
||||||
|
|
||||||
if sz == 0 || sz > defaultBufferSizePut {
|
if sz == 0 || sz > defaultBufferSizePut {
|
||||||
sz = defaultBufferSizePut
|
sz = defaultBufferSizePut
|
||||||
|
|
Loading…
Reference in New Issue