mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: sync.pool won't Put reader back (#16638)
This commit is contained in:
parent
6ea150fd68
commit
3a6cd4f73d
@ -523,6 +523,7 @@ func (er *erasureObjects) streamMetadataParts(ctx context.Context, o listPathOpt
|
||||
}()
|
||||
|
||||
tmp := newMetacacheReader(pr)
|
||||
defer tmp.Close()
|
||||
e, err := tmp.filter(o)
|
||||
pr.CloseWithError(err)
|
||||
entries.o = append(entries.o, e.o...)
|
||||
@ -892,6 +893,11 @@ func listPathRaw(ctx context.Context, opts listPathRawOptions) (err error) {
|
||||
}
|
||||
askDisks := len(disks)
|
||||
readers := make([]*metacacheReader, askDisks)
|
||||
defer func() {
|
||||
for _, r := range readers {
|
||||
r.Close()
|
||||
}
|
||||
}()
|
||||
for i := range disks {
|
||||
r, w := io.Pipe()
|
||||
// Make sure we close the pipe so blocked writes doesn't stay around.
|
||||
|
Loading…
Reference in New Issue
Block a user