Add listing block reuse (#15579)

When streaming results, pool metadata slices when sent.
This commit is contained in:
Klaus Post
2022-08-24 18:11:16 +02:00
committed by GitHub
parent afbb63a197
commit 037fe4afdc
2 changed files with 4 additions and 1 deletions

View File

@@ -184,6 +184,9 @@ func (w *metacacheWriter) stream() (chan<- metaCacheEntry, error) {
continue
}
err = w.mw.WriteBytes(o.metadata)
if w.reuseBlocks || o.reusable {
metaDataPoolPut(o.metadata)
}
if err != nil {
w.streamErr = err
continue