mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
metacache: Always close block writer (#10973)
In some cases a writer could be left behind unclosed, leaking compression blocks. Always close and set compression concurrency to 2 which should be fine to keep up.
This commit is contained in:
@@ -370,6 +370,7 @@ func Test_newMetacacheStream(t *testing.T) {
|
||||
r := loadMetacacheSample(t)
|
||||
var buf bytes.Buffer
|
||||
w := newMetacacheWriter(&buf, 1<<20)
|
||||
defer w.Close()
|
||||
err := r.readFn(func(object metaCacheEntry) bool {
|
||||
err := w.write(object)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user