mirror of
https://github.com/minio/minio.git
synced 2024-12-25 14:45:54 -05:00
Add listing block reuse (#15579)
When streaming results, pool metadata slices when sent.
This commit is contained in:
parent
afbb63a197
commit
037fe4afdc
@ -184,6 +184,9 @@ func (w *metacacheWriter) stream() (chan<- metaCacheEntry, error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = w.mw.WriteBytes(o.metadata)
|
err = w.mw.WriteBytes(o.metadata)
|
||||||
|
if w.reuseBlocks || o.reusable {
|
||||||
|
metaDataPoolPut(o.metadata)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.streamErr = err
|
w.streamErr = err
|
||||||
continue
|
continue
|
||||||
|
@ -168,7 +168,7 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ
|
|||||||
entries[i] = entries[i][:len(entry)-1]
|
entries[i] = entries[i][:len(entry)-1]
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Do do not retain the file.
|
// Do not retain the file.
|
||||||
entries[i] = ""
|
entries[i] = ""
|
||||||
|
|
||||||
if contextCanceled(ctx) {
|
if contextCanceled(ctx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user