Skip to content

Commit 236221d

Browse files
added comments
1 parent cec95ef commit 236221d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

posting/index.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
223223
globalMapI := f(100)
224224
mp.txn.cache.Lock()
225225
defer mp.txn.cache.Unlock()
226+
if mp.txn.cache.globalMap == nil {
227+
mp.txn.cache.globalMap = make(map[string]*types.LockedShardedMap[string, *pb.PostingList])
228+
}
226229
mp.txn.cache.globalMap[pipeline.attr] = globalMapI
227230
// parallelGlobalMap := f(100)
228231

0 commit comments

Comments
 (0)