Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

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

Joachim Brandon LeBlanc132ce941393e
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index 9090c782d..e62d85ee7 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -1917,7 +1917,7 @@ func (f *Fs) getMemoryPool(size int64) *pool.Pool {
if !ok {
f.pools[size] = pool.New(
time.Duration(f.opt.MemoryPoolFlushTime),
- int(f.opt.ChunkSize),
+ int(size),
f.opt.UploadConcurrency*fs.Config.Transfers,
f.opt.MemoryPoolUseMmap,
)