@@ -103,7 +103,7 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
103103 defer func () {
104104 fmt .Println ("Inserting tokenizer indexes for predicate" , pipeline .attr , "took" , time .Since (startTime ))
105105 }()
106-
106+
107107 tokenizers := schema .State ().Tokenizer (ctx , pipeline .attr )
108108 if len (tokenizers ) == 0 {
109109 return
@@ -149,7 +149,6 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
149149 f := func (numGo int ) * types.LockedShardedMap [string , * pb.PostingList ] {
150150 wg := & sync.WaitGroup {}
151151
152-
153152 globalMap := types .NewLockedShardedMap [string , * pb.PostingList ]()
154153 process := func (start int ) {
155154 tokenizers := schema .State ().Tokenizer (ctx , pipeline .attr )
@@ -170,7 +169,7 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
170169 }
171170
172171 posting := valPost [stringValue ]
173- // Build info per iteration without indexEdge.
172+ // Build info per iteration without indexEdge.
174173 info := & indexMutationInfo {
175174 tokenizers : tokenizers ,
176175 factorySpecs : factorySpecs ,
@@ -182,9 +181,9 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
182181 }
183182
184183 info .edge = & pb.DirectedEdge {
185- Attr : pipeline .attr ,
186- Op : pb .DirectedEdge_SET ,
187- Lang : string (posting .LangTag ),
184+ Attr : pipeline .attr ,
185+ Op : pb .DirectedEdge_SET ,
186+ Lang : string (posting .LangTag ),
188187 Value : posting .Value ,
189188 }
190189
@@ -205,7 +204,7 @@ func (mp *MutationPipeline) InsertTokenizerIndexes(ctx context.Context, pipeline
205204 val .Postings = append (val .Postings , valPl .Postings ... )
206205 localMap [string (key )] = val
207206 }
208- }
207+ }
209208
210209 for key , value := range localMap {
211210 // pk, _ := x.Parse([]byte(key))
@@ -497,22 +496,22 @@ func (mp *MutationPipeline) ProcessCount(ctx context.Context, pipeline *Predicat
497496
498497 list .Lock ()
499498 prevCount := list .GetLength (mp .txn .StartTs )
500-
499+
501500 for _ , post := range postingList .Postings {
502501 found , _ , _ := list .findPosting (post .StartTs , post .Uid )
503502 if found {
504503 if post .Op == Set {
505- post .Op = Ovr
504+ post .Op = Ovr
506505 }
507506 } else {
508507 if post .Op == Del {
509508 continue
510509 }
511510 }
512511
513- list .updateMutationLayer (post , isSingle , true )
512+ list .updateMutationLayer (post , isSingle , true )
514513 }
515-
514+
516515 newCount := list .GetLength (mp .txn .StartTs )
517516 updated := list .mutationMap .currentEntries != nil
518517 list .Unlock ()
@@ -560,7 +559,7 @@ func (mp *MutationPipeline) ProcessSingle(ctx context.Context, pipeline *Predica
560559 postings := make (map [uint64 ]* pb.PostingList , 1000 )
561560
562561 dataKey := x .DataKey (pipeline .attr , 0 )
563- insertDeleteAllEdge := ! (index || reverse || count )
562+ insertDeleteAllEdge := ! (index || reverse || count )
564563
565564 var oldVal * pb.Posting
566565 for edge := range pipeline .edges {
@@ -662,12 +661,12 @@ func (mp *MutationPipeline) ProcessSingle(ctx context.Context, pipeline *Predica
662661
663662 for uid , pl := range postings {
664663 binary .BigEndian .PutUint64 (dataKey [len (dataKey )- 8 :], uid )
665- key := baseKey + string (dataKey [len (dataKey )- 8 :])
664+ key := baseKey + string (dataKey [len (dataKey )- 8 :])
666665
667666 if ! noConflict {
668667 mp .txn .addConflictKey (farm .Fingerprint64 ([]byte (key )))
669668 }
670-
669+
671670 if _ , err := mp .txn .AddDelta (key , * pl ); err != nil {
672671 pipeline .errCh <- err
673672 return
@@ -746,7 +745,7 @@ func (mp *MutationPipeline) ProcessPredicate(ctx context.Context, pipeline *Pred
746745 runListFn := false
747746
748747 if ok {
749- if ( isList || su .Lang ) {
748+ if isList || su .Lang {
750749 runListFn = true
751750 }
752751 }
@@ -1795,7 +1794,7 @@ func (r *rebuilder) Run(ctx context.Context) error {
17951794 Key : []byte (key ),
17961795 Value : dataBytes ,
17971796 UserMeta : []byte {BitDeltaPosting },
1798- Version : version ,
1797+ Version : version ,
17991798 }
18001799 kvs = append (kvs , & kv )
18011800 return nil
0 commit comments