Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roachtest: enable DistSender circuit breakers in failover/partial/lease-leader #133214

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pkg/cmd/roachtest/tests/failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,18 @@ func runFailoverPartialLeaseLeader(ctx context.Context, t test.Test, c cluster.C
settings := install.MakeClusterSettings()
settings.Env = append(settings.Env, "COCKROACH_SCAN_MAX_IDLE_TIME=100ms") // speed up replication

// DistSender circuit breakers are useful in this test to avoid artificially
// inflated latencies due to the way the test measures failover time. Without
// circuit breakers, a request stuck on the partitioned leaseholder will get
// blocked indefinitely, despite the range recovering on the other side of the
// partition. As a result, the test won't differentiate between temporary and
// permanent range unavailability. We have other tests which demonstrate the
// benefit of DistSender circuit breakers (especially when applications do not
// use statement timeouts), so we don't need to test them here.
// TODO(arul): this can be removed if/when we turn on DistSender circuit
// breakers for all ranges by default.
settings.ClusterSettings["kv.dist_sender.circuit_breakers.mode"] = "all ranges"

m := c.NewMonitor(ctx, c.CRDBNodes())

failer := makeFailer(t, c, m, failureModeBlackhole, settings, rng).(PartialFailer)
Expand Down
Loading