Skip to content

Commit

Permalink
Merge #103990
Browse files Browse the repository at this point in the history
103990: roachtest: speed up `failover` replication r=erikgrinaker a=erikgrinaker

`failover` test upreplication can take a very long time, over 10 minutes. This patch significantly speeds up upreplication by setting `COCKROACH_SCAN_MAX_IDLE_TIME=100ms`, increasing the replicate queue scan rate.

Touches #103986.

Epic: none
Release note: None

Co-authored-by: Erik Grinaker <[email protected]>
  • Loading branch information
craig[bot] and erikgrinaker committed May 27, 2023
2 parents 8d5a01c + 398653c commit de31561
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cmd/roachtest/tests/failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ func runFailoverPartialLeaseGateway(
// Create cluster.
opts := option.DefaultStartOpts()
settings := install.MakeClusterSettings()
settings.Env = append(settings.Env, "COCKROACH_SCAN_MAX_IDLE_TIME=100ms") // speed up replication

failer := makeFailer(t, c, failureModeBlackhole, opts, settings).(PartialFailer)
failer.Setup(ctx)
Expand Down Expand Up @@ -499,6 +500,7 @@ func runFailoverPartialLeaseLeader(
opts := option.DefaultStartOpts()
settings := install.MakeClusterSettings()
settings.Env = append(settings.Env, "COCKROACH_DISABLE_LEADER_FOLLOWS_LEASEHOLDER=true")
settings.Env = append(settings.Env, "COCKROACH_SCAN_MAX_IDLE_TIME=100ms") // speed up replication

failer := makeFailer(t, c, failureModeBlackhole, opts, settings).(PartialFailer)
failer.Setup(ctx)
Expand Down Expand Up @@ -652,6 +654,7 @@ func runFailoverPartialLeaseLiveness(
// Create cluster.
opts := option.DefaultStartOpts()
settings := install.MakeClusterSettings()
settings.Env = append(settings.Env, "COCKROACH_SCAN_MAX_IDLE_TIME=100ms") // speed up replication

failer := makeFailer(t, c, failureModeBlackhole, opts, settings).(PartialFailer)
failer.Setup(ctx)
Expand Down Expand Up @@ -795,6 +798,7 @@ func runFailoverNonSystem(
opts := option.DefaultStartOpts()
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

failer := makeFailer(t, c, failureMode, opts, settings)
failer.Setup(ctx)
Expand Down Expand Up @@ -936,6 +940,7 @@ func runFailoverLiveness(
opts := option.DefaultStartOptsNoBackups()
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

failer := makeFailer(t, c, failureMode, opts, settings)
failer.Setup(ctx)
Expand Down Expand Up @@ -1081,6 +1086,7 @@ func runFailoverSystemNonLiveness(
opts := option.DefaultStartOpts()
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

failer := makeFailer(t, c, failureMode, opts, settings)
failer.Setup(ctx)
Expand Down

0 comments on commit de31561

Please sign in to comment.