@@ -457,7 +457,7 @@ func ReadPostingList(key []byte, it *badger.Iterator) (*List, error) {
457457 return l , nil
458458}
459459
460- func GetSingleValueForKey (key []byte , readTs uint64 ) (* List , error , int ) {
460+ func GetSingleValueForKey (key []byte , readTs uint64 ) (* List , error ) {
461461 cachedVal , ok := lCache .Get (key )
462462 if ok {
463463 l , ok := cachedVal .(* List )
@@ -477,25 +477,23 @@ func GetSingleValueForKey(key []byte, readTs uint64) (*List, error, int) {
477477 }
478478 }
479479 l .RUnlock ()
480- return lCopy , nil , 0
480+ return lCopy , nil
481481 }
482482 }
483483
484484 if pstore .IsClosed () {
485- return nil , badger .ErrDBClosed , 0
485+ return nil , badger .ErrDBClosed
486486 }
487487
488488 l := new (List )
489489 l .key = key
490490 l .plist = new (pb.PostingList )
491491
492- //fmt.Println("KEY:", key)
493492 txn := pstore .NewTransactionAt (readTs , false )
494493 item , err := txn .Get (key )
495494 if err != nil {
496- return l , err , 0
495+ return l , err
497496 }
498- k := 0
499497
500498 l .maxTs = x .Max (l .maxTs , item .Version ())
501499
@@ -504,7 +502,7 @@ func GetSingleValueForKey(key []byte, readTs uint64) (*List, error, int) {
504502 l .minTs = item .Version ()
505503 case BitCompletePosting :
506504 if err := unmarshalOrCopy (l .plist , item ); err != nil {
507- return l , nil , k
505+ return l , nil
508506 }
509507 l .minTs = item .Version ()
510508
@@ -527,11 +525,11 @@ func GetSingleValueForKey(key []byte, readTs uint64) (*List, error, int) {
527525 return nil
528526 })
529527 if err != nil {
530- return l , nil , k
528+ return l , nil
531529 }
532530 }
533531
534- return l , nil , k
532+ return l , nil
535533}
536534
537535func getNew (key []byte , pstore * badger.DB , readTs uint64 ) (* List , error ) {
0 commit comments