[#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
Leonard Lyubich 2022-02-21 21:39:31 +03:00 committed by Kirillov Denis
parent 035f1d5667
commit 29c057272c
1 changed files with 1 additions and 1 deletions

View File

@ -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