Skip to content

Commit

Permalink
roachtest: wait for splits before starting worker for kv50/rangelooku…
Browse files Browse the repository at this point in the history
…ps/relocate

Relocates were failing due to concurrent splits that were a part of the
kv initialization step. This commit waits until the initialization and
split step has completed before starting the workers.

Release note: None
  • Loading branch information
jeffrey-xiao committed Aug 9, 2019
1 parent 0a1c157 commit 5b43c41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cmd/roachtest/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,16 @@ func registerKVRangeLookups(r *testRegistry) {
m := newMonitor(ctx, c, c.Range(1, nodes))
m.Go(func(ctx context.Context) error {
defer close(doneWorkload)
cmd := fmt.Sprintf("./workload init kv {pgurl:1-%d}", nodes)
cmd := fmt.Sprintf("./workload init kv {pgurl:1-%d} --splits=1000", nodes)
c.Run(ctx, c.Node(nodes+1), cmd)
close(doneInit)
concurrency := ifLocal("", " --concurrency="+fmt.Sprint(nodes*64))
splits := " --splits=1000"
duration := " --duration=" + ifLocal("10s", "10m")
readPercent := " --read-percent=50"
// We run kv with --tolerate-errors, since the relocate workload is
// expected to create `result is ambiguous (removing replica)` errors.
cmd = fmt.Sprintf("./workload run kv --tolerate-errors"+
concurrency+splits+duration+readPercent+
concurrency+duration+readPercent+
" {pgurl:1-%d}", nodes)
start := timeutil.Now()
c.Run(ctx, c.Node(nodes+1), cmd)
Expand Down

0 comments on commit 5b43c41

Please sign in to comment.