Skip to content

Commit c493fe4

Browse files
Start a random slot in the case of cluster benchmarks and commands without key (#89)
1 parent 9150983 commit c493fe4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/ftsb_redisearch/cmd_processor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
radix "github.com/mediocregopher/radix/v3"
88
"golang.org/x/time/rate"
99
"log"
10+
"math/rand"
1011
"strconv"
1112
"strings"
1213
"sync"
@@ -85,6 +86,8 @@ func connectionProcessor(p *processor, rateLimiter *rate.Limiter, useRateLimiter
8586
}
8687
}
8788
clusterAddrLen = len(clusterSlots)
89+
// start at a random slot between 0 and clusterAddrLen
90+
slotP = rand.Intn(clusterAddrLen)
8891
}
8992

9093
for row := range p.rows {

0 commit comments

Comments
 (0)