backend/s3: use the provided size parameter when allocating a new memory pool - fixes #4047 (#4049)

This commit is contained in:
Joachim Brandon LeBlanc 2020-03-09 11:56:21 -05:00 committed by GitHub
parent a492c0fb0e
commit 132ce94139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1917,7 +1917,7 @@ func (f *Fs) getMemoryPool(size int64) *pool.Pool {
if !ok { if !ok {
f.pools[size] = pool.New( f.pools[size] = pool.New(
time.Duration(f.opt.MemoryPoolFlushTime), time.Duration(f.opt.MemoryPoolFlushTime),
int(f.opt.ChunkSize), int(size),
f.opt.UploadConcurrency*fs.Config.Transfers, f.opt.UploadConcurrency*fs.Config.Transfers,
f.opt.MemoryPoolUseMmap, f.opt.MemoryPoolUseMmap,
) )