diff --git a/posting/mvcc.go b/posting/mvcc.go index 4f5ad842cac..6ca016b44ab 100644 --- a/posting/mvcc.go +++ b/posting/mvcc.go @@ -361,6 +361,9 @@ func ReadPostingList(key []byte, it *badger.Iterator) (*List, error) { } func getNew(key []byte, pstore *badger.DB, readTs uint64) (*List, error) { + if pstore.IsClosed() { + return nil, badger.ErrDBClosed + } txn := pstore.NewTransactionAt(readTs, false) defer txn.Discard()