Skip to content
/ etcd Public
forked from etcd-io/etcd

Commit

Permalink
etcd-tester: fix "writeTxn" key selection
Browse files Browse the repository at this point in the history
Found when debugging etcd-io#9130.

Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Jan 11, 2018
1 parent 52f73c5 commit 6cf220c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/functional-tester/etcd-tester/key_stresser.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func writeTxn(kvc pb.KVClient, keys []string, txnOps int) stressFunc {
return func(ctx context.Context) (error, int64) {
ks := make(map[string]struct{}, txnOps)
for len(ks) != txnOps {
ks[keys[rand.Intn(64)]] = struct{}{}
ks[keys[rand.Intn(len(keys))]] = struct{}{}
}
selected := make([]string, 0, txnOps)
for k := range ks {
Expand Down

0 comments on commit 6cf220c

Please sign in to comment.