Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer committed Feb 10, 2022
1 parent bd114c5 commit cb93ae1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions br/pkg/restore/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,7 @@ func rewriteEncodedKey(key []byte, rewriteRules *RewriteRules) ([]byte, *import_
}
if len(key) > 0 {
_, rawKey, _ := codec.DecodeBytes(key, nil)
rule := matchOldPrefix(rawKey, rewriteRules)
ret := bytes.Replace(rawKey, rule.GetOldKeyPrefix(), rule.GetNewKeyPrefix(), 1)
return codec.EncodeBytes([]byte{}, ret), rule
return rewriteRawKey(rawKey, rewriteRules)
}
return nil, nil
}
Expand Down

0 comments on commit cb93ae1

Please sign in to comment.