diff --git a/posting/lists.go b/posting/lists.go index 39d3afd14ce..d089fd0a553 100644 --- a/posting/lists.go +++ b/posting/lists.go @@ -143,7 +143,7 @@ func (vc *viLocalCache) GetWithLockHeld(key []byte) (rval index.Value, rerr erro func (vc *viLocalCache) GetValueFromPostingList(pl *List) (rval index.Value, rerr error) { value := pl.findStaticValue(vc.delegate.startTs) - if value == nil { + if value == nil || len(value.Postings) == 0 { return nil, ErrNoValue } diff --git a/posting/oracle.go b/posting/oracle.go index bc03dc9a861..c74190da8ce 100644 --- a/posting/oracle.go +++ b/posting/oracle.go @@ -105,7 +105,7 @@ func (vt *viTxn) GetWithLockHeld(key []byte) (rval index.Value, rerr error) { func (vt *viTxn) GetValueFromPostingList(pl *List) (rval index.Value, rerr error) { value := pl.findStaticValue(vt.delegate.StartTs) - if value == nil { + if value == nil || len(value.Postings) == 0 { //fmt.Println("DIFF", val, err, nil, badger.ErrKeyNotFound) return nil, ErrNoValue }