Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzmauro committed Oct 22, 2024
1 parent 4e310d3 commit db2fe6f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions splitio/proxy/storage/large_segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ func (s *LargeSegmentsStorageImpl) names() []string {
}

func (s *LargeSegmentsStorageImpl) exists(lsName string, userKey string) bool {
data := s.largeSegments[lsName]
length := len(data)
if length == 0 {
data, ok := s.largeSegments[lsName]
if !ok {
return false
}

i := sort.Search(length, func(i int) bool {
i := sort.Search(len(data), func(i int) bool {
return data[i] >= userKey
})

Expand Down

0 comments on commit db2fe6f

Please sign in to comment.