Skip to content

Commit

Permalink
Start a random slot in the case of cluster benchmarks and commands wi…
Browse files Browse the repository at this point in the history
…thout key (#89)
  • Loading branch information
filipecosta90 authored Mar 31, 2023
1 parent 9150983 commit c493fe4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ftsb_redisearch/cmd_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
radix "github.com/mediocregopher/radix/v3"
"golang.org/x/time/rate"
"log"
"math/rand"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -85,6 +86,8 @@ func connectionProcessor(p *processor, rateLimiter *rate.Limiter, useRateLimiter
}
}
clusterAddrLen = len(clusterSlots)
// start at a random slot between 0 and clusterAddrLen
slotP = rand.Intn(clusterAddrLen)
}

for row := range p.rows {
Expand Down

0 comments on commit c493fe4

Please sign in to comment.