Skip to content

Commit 1ecdcbb

Browse files
fixed race condition
1 parent 72a8226 commit 1ecdcbb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

posting/lists.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ func (d *Deltas) Get(key string) ([]byte, bool) {
118118
return nil, false
119119
}
120120

121-
value, ok := d.GetIndexMapForPredicate(pk.Attr).Get(key)
121+
if _, ok := d.indexMap[pk.Attr]; !ok {
122+
return nil, false
123+
}
124+
125+
value, ok := d.indexMap[pk.Attr].Get(key)
122126
if !ok {
123127
return nil, false
124128
}

0 commit comments

Comments
 (0)