diff --git a/pkg/bloomcompactor/batch.go b/pkg/bloomcompactor/batch.go index 79edc16104a00..e0787c1f6f1ec 100644 --- a/pkg/bloomcompactor/batch.go +++ b/pkg/bloomcompactor/batch.go @@ -248,9 +248,11 @@ func (i *blockLoadingIter) Reset() error { if !i.initialized { return nil } - i.initialized = false // close loaded queriers - return i.Close() + err := i.Close() + i.initialized = false + clear(i.loaded) + return err } func (i *blockLoadingIter) init() {