diff --git a/pkg/ccl/changefeedccl/BUILD.bazel b/pkg/ccl/changefeedccl/BUILD.bazel index 6a610bf042f0..da22e7e8285f 100644 --- a/pkg/ccl/changefeedccl/BUILD.bazel +++ b/pkg/ccl/changefeedccl/BUILD.bazel @@ -115,6 +115,7 @@ go_library( "//pkg/util/ctxgroup", "//pkg/util/duration", "//pkg/util/encoding/csv", + "//pkg/util/envutil", "//pkg/util/hlc", "//pkg/util/httputil", "//pkg/util/humanizeutil", diff --git a/pkg/ccl/changefeedccl/retry.go b/pkg/ccl/changefeedccl/retry.go index 7537fa19c723..f8b3750f8de9 100644 --- a/pkg/ccl/changefeedccl/retry.go +++ b/pkg/ccl/changefeedccl/retry.go @@ -12,11 +12,13 @@ import ( "context" "time" + "github.com/cockroachdb/cockroach/pkg/util/envutil" "github.com/cockroachdb/cockroach/pkg/util/retry" "github.com/cockroachdb/cockroach/pkg/util/timeutil" ) -var useFastRetry = false +var useFastRetry = envutil.EnvOrDefaultBool( + "COCKROACH_CHANGEFEED_TESTING_FAST_RETRY", false) // getRetry returns retry object for changefeed. func getRetry(ctx context.Context) Retry { @@ -30,7 +32,7 @@ func getRetry(ctx context.Context) Retry { opts = retry.Options{ InitialBackoff: 5 * time.Millisecond, Multiplier: 2, - MaxBackoff: 250 * time.Minute, + MaxBackoff: 250 * time.Millisecond, } } diff --git a/pkg/cmd/roachtest/tests/cdc.go b/pkg/cmd/roachtest/tests/cdc.go index 78a5b694e73c..0174df325d5c 100644 --- a/pkg/cmd/roachtest/tests/cdc.go +++ b/pkg/cmd/roachtest/tests/cdc.go @@ -483,7 +483,7 @@ func newCDCTester(ctx context.Context, t test.Test, c cluster.Cluster) cdcTester c.Put(ctx, t.Cockroach(), "./cockroach") settings := install.MakeClusterSettings() - settings.Env = append(settings.Env, "COCKROACH_EXPERIMENTAL_ENABLE_PER_CHANGEFEED_METRICS=true") + settings.Env = append(settings.Env, "COCKROACH_CHANGEFEED_TESTING_FAST_RETRY=true") c.Start(ctx, t.L(), option.DefaultStartOpts(), settings, tester.crdbNodes) c.Put(ctx, t.DeprecatedWorkload(), "./workload", tester.workloadNode)