Skip to content

Commit

Permalink
Merge pull request cockroachdb#100607 from cockroachdb/blathers/backp…
Browse files Browse the repository at this point in the history
…ort-release-23.1-100541

release-23.1: logictest: disable circuit breakers in TestParallel
  • Loading branch information
yuzefovich authored Apr 4, 2023
2 parents 185b893 + 3444d0b commit 91c7269
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
16 changes: 3 additions & 13 deletions pkg/cmd/roachtest/tests/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ type tpccOptions struct {
// also be doing a rolling-restart into the new binary while the cluster
// is running, but that feels like jamming too much into the tpcc setup.
Start func(context.Context, test.Test, cluster.Cluster)
// EnableCircuitBreakers causes the kv.replica_circuit_breaker.slow_replication_threshold
// setting to be populated, which enables per-Replica circuit breakers.
//
// TODO(tbg): remove this once https://github.com/cockroachdb/cockroach/issues/74705 is completed.
EnableCircuitBreakers bool
// SkipPostRunCheck, if set, skips post TPC-C run checks.
SkipPostRunCheck bool
DisableDefaultScheduledBackup bool
Expand Down Expand Up @@ -165,10 +160,6 @@ func setupTPCC(
opts.Start(ctx, t, c)
db := c.Conn(ctx, t.L(), 1)
defer db.Close()
if opts.EnableCircuitBreakers {
_, err := db.Exec(`SET CLUSTER SETTING kv.replica_circuit_breaker.slow_replication_threshold = '15s'`)
require.NoError(t, err)
}

if t.SkipInit() {
return
Expand Down Expand Up @@ -508,10 +499,9 @@ func registerTPCC(r registry.Registry) {
headroomWarehouses := int(float64(maxWarehouses) * 0.7)
t.L().Printf("computed headroom warehouses of %d\n", headroomWarehouses)
runTPCC(ctx, t, c, tpccOptions{
Warehouses: headroomWarehouses,
Duration: 120 * time.Minute,
SetupType: usingImport,
EnableCircuitBreakers: true,
Warehouses: headroomWarehouses,
Duration: 120 * time.Minute,
SetupType: usingImport,
})
},
})
Expand Down
5 changes: 5 additions & 0 deletions pkg/sql/logictest/parallel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ func (t *parallelTest) setup(ctx context.Context, spec *parTestSpec) {
r0.Exec(t, `UPDATE system.zones SET config = $2 WHERE id = $1`, objID, buf)
}

// Disable the circuit breakers on this cluster because they can lead to
// rare test flakes since the machine is likely to be overloaded when
// running TestParallel.
r0.Exec(t, `SET CLUSTER SETTING kv.replica_circuit_breaker.slow_replication_threshold = '0s'`)

if testing.Verbose() || log.V(1) {
log.Infof(t.ctx, "Creating database")
}
Expand Down

0 comments on commit 91c7269

Please sign in to comment.