Skip to content

Commit

Permalink
*: remove redundant go_test
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Jan 31, 2024
1 parent fb5a850 commit 83b93a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/locate/region_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ func (l *KeyLocation) locateBucket(key []byte) *Bucket {
keys := l.Buckets.GetKeys()
searchLen := len(keys) - 1
i, found := slices.BinarySearchFunc(keys, key, func(a, b []byte) int {
return bytes.Compare(a, b)
return -bytes.Compare(a, b)
})

// buckets contains region's start/end key, so i==0 means it can't find a suitable bucket
Expand Down

0 comments on commit 83b93a0

Please sign in to comment.