Skip to content

Commit

Permalink
Merge #118852
Browse files Browse the repository at this point in the history
118852: roachtest: add mixed isolation level variant of TPC-C r=nvanbenschoten a=nvanbenschoten

Closes #118272.

This commit adds the following roachtest:
```
tpcc-nowait/isolation-level=mixed/nodes=3/w=1
```

This roachtest runs TPC-C with some transactions at every supported isolation level (including aliases, for added test coverage).

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
  • Loading branch information
craig[bot] and nvanbenschoten committed Feb 6, 2024
2 parents 47a68b5 + 11502cc commit d7d442e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkg/cmd/roachtest/tests/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,40 @@ func registerTPCC(r registry.Registry) {
})
},
})
r.Add(registry.TestSpec{
Name: "tpcc-nowait/isolation-level=mixed/nodes=3/w=1",
Owner: registry.OwnerTestEng,
Benchmark: true,
Cluster: r.MakeClusterSpec(4, spec.CPU(16)),
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Nightly),
EncryptionSupport: registry.EncryptionMetamorphic,
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runTPCC(ctx, t, c, tpccOptions{
Warehouses: 5,
Duration: 10 * time.Minute,
ExtraRunArgs: "--wait=false",
SetupType: usingImport,
ExpensiveChecks: true,
WorkloadInstances: func() (ret []workloadInstance) {
isoLevels := []string{"read_uncommitted", "read_committed", "repeatable_read", "snapshot", "serializable"}
for i, isoLevel := range isoLevels {
args := "--isolation-level=" + isoLevel
if i <= 1 { // read_uncommitted and read_committed
args += " --txn-retries=false"
}
ret = append(ret, workloadInstance{
nodes: c.Range(1, c.Spec().NodeCount-1),
prometheusPort: 2112 + i,
extraRunArgs: args,
})
}
return ret
}(),
})
},
})

r.Add(registry.TestSpec{
Name: "weekly/tpcc/headroom",
Expand Down

0 comments on commit d7d442e

Please sign in to comment.