Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cockroachdb/cockroach
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ff2708c4c796417efa49b87a09b94952953b7395
Choose a base ref
..
head repository: cockroachdb/cockroach
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 92dced7dcdbe036a0916867d573d950626dcc434
Choose a head ref
Showing with 8 additions and 2 deletions.
  1. +8 −2 pkg/cmd/roachtest/tests/disk_stall.go
10 changes: 8 additions & 2 deletions pkg/cmd/roachtest/tests/disk_stall.go
Original file line number Diff line number Diff line change
@@ -130,6 +130,7 @@ func runDiskStalledDetection(ctx context.Context, t test.Test, c cluster.Cluster
case <-time.After(2 * maxSyncDur):
}
uptime, err = getUptime(ctx, adminUIAddrs[0])
t.L().PrintfCtx(ctx, "node uptime is %s\n", uptime)
if err == nil && timeutil.Now().Add(-uptime).Before(stalledAt) {
t.Fatalf("node's uptime of %s indicates it's been up since before the stall at %s", uptime, stalledAt)
}
@@ -242,8 +243,13 @@ func (s *cgroupDiskStaller) setThroughput(
ctx context.Context, nodes option.NodeListOption, readOrWrite string, bytesPerSecond int,
) {
major, minor := s.device()
s.c.Run(ctx, nodes, fmt.Sprintf(`echo %d:%d %d | sudo cat > /sys/fs/cgroup/blkio/blkio.throttle.%s_bps_device`,
major, minor, bytesPerSecond, readOrWrite))
s.c.Run(ctx, nodes, "sudo", "/bin/bash", "-c", fmt.Sprintf(
"'echo %d:%d %d > /sys/fs/cgroup/blkio/blkio.throttle.%s_bps_device'",
major,
minor,
bytesPerSecond,
readOrWrite,
))
}

// fuseDiskStaller uses a FUSE filesystem (charybdefs) to insert an artifical