Merge pull request #1723 from molecula/seebs/genfix

don't close storage after failing to open cache
This commit is contained in:
seebs 2021-10-01 15:52:42 -05:00 committed by GitHub
commit 39aa12b12a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -286,10 +286,6 @@ func (f *fragment) Open() error {
// Fill cache with rows persisted to disk.
f.holder.Logger.Debugf("open cache for index/field/view/fragment: %s/%s/%s/%d", f.index(), f.field(), f.view(), f.shard)
if err := f.openCache(); err != nil {
e2 := f.closeStorage()
if e2 != nil {
return errors.Wrapf(err, "closing storage: %v, after opening cache", e2)
}
return errors.Wrap(err, "opening cache")
}