mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: get rid of large buffers (#19549)
these lead to run-away usage of memory beyond which the Go's GC can handle, we have to re-visit this differently, remove this for now.
This commit is contained in:
@@ -2124,14 +2124,6 @@ func (s *xlStorage) writeAllDirect(ctx context.Context, filePath string, fileSiz
|
||||
|
||||
var bufp *[]byte
|
||||
switch {
|
||||
case fileSize > 0 && fileSize >= xioutil.XXLargeBlock*2:
|
||||
// use a larger 8MiB buffer for a really really large streamsx.
|
||||
bufp = xioutil.ODirectPoolXXLarge.Get().(*[]byte)
|
||||
defer xioutil.ODirectPoolXXLarge.Put(bufp)
|
||||
case fileSize > 0 && fileSize >= xioutil.XLargeBlock:
|
||||
// use a larger 4MiB buffer for a really large streams.
|
||||
bufp = xioutil.ODirectPoolXLarge.Get().(*[]byte)
|
||||
defer xioutil.ODirectPoolXLarge.Put(bufp)
|
||||
case fileSize <= xioutil.SmallBlock:
|
||||
bufp = xioutil.ODirectPoolSmall.Get().(*[]byte)
|
||||
defer xioutil.ODirectPoolSmall.Put(bufp)
|
||||
|
||||
Reference in New Issue
Block a user