Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
99075: roachtest: update disk-stall roachtests to wait for uprepl first r=nicktrav a=jbowens

This reduces the amount of work.

Informs cockroachdb#98904.
Epic: None
Release note: None

Co-authored-by: Jackson Owens <[email protected]>
  • Loading branch information
craig[bot] and jbowens committed Mar 21, 2023
2 parents c3b4ec9 + 5bb9dfc commit 1e9899d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/cmd/roachtest/tests/disk_stall.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,22 @@ func runDiskStalledDetection(
require.NoError(t, err)
adminURL := adminUIAddrs[0]

c.Run(ctx, c.Node(4), `./cockroach workload init kv --splits 1000 {pgurl:1}`)
// Open SQL connections—one to n1, the node that will be stalled, and one to
// n2 that should remain open and active for the remainder.
n1Conn := c.Conn(ctx, t.L(), 1)
defer n1Conn.Close()
n2conn := c.Conn(ctx, t.L(), 2)
defer n2conn.Close()
require.NoError(t, n1Conn.PingContext(ctx))
_, err = n2conn.ExecContext(ctx, `USE kv;`)
require.NoError(t, err)

// Wait for upreplication.
require.NoError(t, WaitFor3XReplication(ctx, t, n2conn))

c.Run(ctx, c.Node(4), `./cockroach workload init kv --splits 1000 {pgurl:1}`)

_, err = n2conn.ExecContext(ctx, `USE kv;`)
require.NoError(t, err)

t.Status("starting workload")
workloadStartAt := timeutil.Now()
m := c.NewMonitor(ctx, c.Range(1, 3))
Expand Down

0 comments on commit 1e9899d

Please sign in to comment.