Skip to content

Commit

Permalink
roachtest: maybe init tpcc with column families in backup-restore tests
Browse files Browse the repository at this point in the history
This patch inits the tpcc workload with column families 50% of the time in the
backup-mixed-version and backup-restore/roundtrip tests.

This patch is the first step to recreating a roachtest workload that can
reproduce #109483.

Release note: None

Epic: none
  • Loading branch information
msbutler committed Oct 13, 2023
1 parent d66e07e commit 46094d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/backup_restore_roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func startBackgroundWorkloads(
// for the cluster used in this test without overloading it,
// which can make the backups take much longer to finish.
const numWarehouses = 100
tpccInit, tpccRun := tpccWorkloadCmd(numWarehouses, roachNodes)
tpccInit, tpccRun := tpccWorkloadCmd(testRNG, numWarehouses, roachNodes)
bankInit, bankRun := bankWorkloadCmd(testRNG, roachNodes)

err := c.RunE(ctx, workloadNode, bankInit.String())
Expand Down
5 changes: 3 additions & 2 deletions pkg/cmd/roachtest/tests/mixed_version_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ func registerBackupMixedVersion(r registry.Registry) {
// which can make the backups take much longer to finish.
const numWarehouses = 100
bankInit, bankRun := bankWorkloadCmd(testRNG, roachNodes)
tpccInit, tpccRun := tpccWorkloadCmd(numWarehouses, roachNodes)
tpccInit, tpccRun := tpccWorkloadCmd(testRNG, numWarehouses, roachNodes)

mvt.OnStartup("set short job interval", backupTest.setShortJobIntervals)
mvt.OnStartup("take backup in previous version", backupTest.maybeTakePreviousVersionBackup)
Expand Down Expand Up @@ -2406,9 +2406,10 @@ func registerBackupMixedVersion(r registry.Registry) {
}

func tpccWorkloadCmd(
numWarehouses int, roachNodes option.NodeListOption,
testRNG *rand.Rand, numWarehouses int, roachNodes option.NodeListOption,
) (init *roachtestutil.Command, run *roachtestutil.Command) {
init = roachtestutil.NewCommand("./cockroach workload init tpcc").
MaybeOption(testRNG.Intn(2) == 0, "families").
Arg("{pgurl%s}", roachNodes).
Flag("warehouses", numWarehouses)
run = roachtestutil.NewCommand("./cockroach workload run tpcc").
Expand Down

0 comments on commit 46094d5

Please sign in to comment.