Skip to content

Commit 8aff3c8

Browse files
Fixed another bug
1 parent 323696c commit 8aff3c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

posting/lists.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,18 @@ func (lc *LocalCache) getInternal(key []byte, readFromDisk bool) (*List, error)
254254
func (lc *LocalCache) GetSinglePosting(key []byte) (*pb.PostingList, error) {
255255
pl := &pb.PostingList{}
256256
validatePl := func() {
257+
i := 0
257258
for _, postings := range pl.Postings {
258259
if hasDeleteAll(postings) {
259260
pl = nil
260261
return
261262
}
263+
if postings.Op != Del {
264+
pl.Postings[i] = postings
265+
i++
266+
}
262267
}
268+
pl.Postings = pl.Postings[:i]
263269
}
264270
lc.RLock()
265271
if delta, ok := lc.deltas[string(key)]; ok && len(delta) > 0 {

0 commit comments

Comments
 (0)