From 099bc4a5b369747ce9975841dea57f161bfafdb2 Mon Sep 17 00:00:00 2001 From: Arul Ajmani Date: Wed, 8 May 2024 18:01:21 +0100 Subject: [PATCH] roachtest: turn on DistSender circuit breakers for failover chaos tests Failover chaos tests create assymetric partitions, where DistSender circuit breakers are useful. It prevents failure modes such as https://github.com/cockroachdb/cockroach/issues/123736#issuecomment-2100948030. Fixes #123736 Release note: None --- pkg/cmd/roachtest/tests/failover.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/failover.go b/pkg/cmd/roachtest/tests/failover.go index f5b673d642bb..dd85e46b124a 100644 --- a/pkg/cmd/roachtest/tests/failover.go +++ b/pkg/cmd/roachtest/tests/failover.go @@ -208,11 +208,14 @@ func runFailoverChaos(ctx context.Context, t test.Test, c cluster.Cluster, readO rng, _ := randutil.NewTestRand() - // Create cluster, and set up failers for all failure modes. + // Create cluster, and set up failures for all failure modes. settings := install.MakeClusterSettings() settings.Env = append(settings.Env, "COCKROACH_ENABLE_UNSAFE_TEST_BUILTINS=true") settings.Env = append(settings.Env, "COCKROACH_SCAN_MAX_IDLE_TIME=100ms") // speed up replication + // DistSender circuit breakers are useful for these chaos tests. Turn them on. + settings.ClusterSettings["kv.dist_sender.circuit_breakers.mode"] = "all ranges" + m := c.NewMonitor(ctx, c.Range(1, 9)) failers := []Failer{}