Skip to content

Commit 1039322

Browse files
added filter for vector lengths
1 parent 7c8a61d commit 1039322

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

posting/index.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
234234
mp.txn.cache.Lock()
235235
defer mp.txn.cache.Unlock()
236236

237-
// if info.hasUpsert {
238-
// globalMapI.Iterate(func(key string, value *pb.PostingList) error {
239-
// mp.txn.addConflictKey(farm.Fingerprint64([]byte(key)))
240-
// return nil
241-
// })
242-
// }
237+
if info.hasUpsert {
238+
globalMapI.Iterate(func(key string, value *pb.PostingList) error {
239+
mp.txn.addConflictKey(farm.Fingerprint64([]byte(key)))
240+
return nil
241+
})
242+
}
243243

244244
globalMap := mp.txn.cache.deltas.GetIndexMapForPredicate(pipeline.attr)
245245
if globalMap == nil {
@@ -458,10 +458,10 @@ func (txn *Txn) addConflictKeyWithUid(key []byte, pl *pb.PostingList, hasUpsert
458458
txn.conflicts = make(map[uint64]struct{})
459459
}
460460
keyHash := farm.Fingerprint64(key)
461-
if hasUpsert {
462-
txn.conflicts[keyHash] = struct{}{}
463-
return
464-
}
461+
// if hasUpsert {
462+
// txn.conflicts[keyHash] = struct{}{}
463+
// return
464+
// }
465465
for _, post := range pl.Postings {
466466
txn.conflicts[keyHash^post.Uid] = struct{}{}
467467
}

0 commit comments

Comments
 (0)