@@ -431,7 +431,6 @@ func (db *Database) computeMissingRanges(latestVersion int64) error {
431
431
// We have a full chunk from (lastHashed+1) .. nextTarget
432
432
begin := lastHashed + 1
433
433
end := nextTarget
434
-
435
434
if err := db .computeHashForRange (begin , end ); err != nil {
436
435
return err
437
436
}
@@ -950,25 +949,6 @@ func parseStoreKey(key []byte) (string, error) {
950
949
return keyStr [LenPrefixStore : LenPrefixStore + slashIndex ], nil
951
950
}
952
951
953
- // Parses actual key from key with format "s/k:{store}/{actualKey}"
954
- func parseKey (key []byte ) ([]byte , error ) {
955
- // Convert byte slice to string only once
956
- keyStr := string (key )
957
-
958
- if ! strings .HasPrefix (keyStr , PrefixStore ) {
959
- return nil , fmt .Errorf ("not a valid store key" )
960
- }
961
-
962
- // Find the first occurrence of "/" after the prefix
963
- slashIndex := strings .Index (keyStr [LenPrefixStore :], "/" )
964
- if slashIndex == - 1 {
965
- return nil , fmt .Errorf ("not a valid store key" )
966
- }
967
-
968
- // Return everything after the first "/" as bytes
969
- return []byte (keyStr [LenPrefixStore + slashIndex + 1 :]), nil
970
- }
971
-
972
952
func getMVCCSlice (db * pebble.DB , storeKey string , key []byte , version int64 ) ([]byte , error ) {
973
953
// end domain is exclusive, so we need to increment the version by 1
974
954
if version < math .MaxInt64 {
0 commit comments