diff --git a/cmd/metacache-stream.go b/cmd/metacache-stream.go index 5c42424a6..f91f4bd1b 100644 --- a/cmd/metacache-stream.go +++ b/cmd/metacache-stream.go @@ -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 diff --git a/cmd/metacache-walk.go b/cmd/metacache-walk.go index 8c4face7e..5da3c6baa 100644 --- a/cmd/metacache-walk.go +++ b/cmd/metacache-walk.go @@ -168,7 +168,7 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ entries[i] = entries[i][:len(entry)-1] continue } - // Do do not retain the file. + // Do not retain the file. entries[i] = "" if contextCanceled(ctx) {