Skip to content

Commit b708dbe

Browse files
craig[bot]ajstorm
andcommitted
Merge #145257
145257: workload: add a literal implementation of tpcc r=mgartner a=ajstorm Our current TPC-C kit is heavily optimized. For example, in several places we combine an update and a select with an UPDATE...RETURNING statement. In other places, we use IN lists to reduce the number of round-trips from the client to the server. As best I can tell, all of this is acceptable according to the specification (after all, you can reduce the round-trips to 1 by implementing each transaction as a stored procedure), however some kits implement things much more literally, with one client-server roundtrip for each step of each transaction. This commit adds a literal implementation for the New Order and Payment transactions. We're focusing our attention there for now, as these two transactions comprise 88% of the workload. One change made in this commit which isn't fully explained by code comments is the movement of the inserts into the orders and new orders table higher up in the New Order transaction. This shouldn't have any bearing on the transaction logic, but is moved up to allow for more common code, and also since according to the spec, it should occur before the items are processed. NOTE: There's a significant amount of whitespace changes in this commit. When reviewing, you'll want to turn off the whitespace changes to avoid having to review all of them. Epic: none Release note: none Co-authored-by: Adam Storm <[email protected]>
2 parents 1057749 + 484da5f commit b708dbe

File tree

4 files changed

+645
-218
lines changed

4 files changed

+645
-218
lines changed

pkg/cmd/roachtest/tests/tpcc.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,26 @@ func registerTPCC(r registry.Registry) {
759759
},
760760
})
761761

762+
r.Add(registry.TestSpec{
763+
Name: "tpcc-nowait/literal/w=1000/nodes=5/cpu=16",
764+
Owner: registry.OwnerTestEng,
765+
Benchmark: true,
766+
Cluster: r.MakeClusterSpec(6, spec.CPU(16), spec.WorkloadNode()),
767+
CompatibleClouds: registry.AllExceptAzure,
768+
Suites: registry.Suites(registry.Nightly),
769+
TestSelectionOptOutSuites: registry.Suites(registry.Nightly),
770+
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
771+
runTPCC(ctx, t, t.L(), c, tpccOptions{
772+
Warehouses: 1000,
773+
Duration: 10 * time.Minute,
774+
ExtraRunArgs: "--wait=false --tolerate-errors --workers=200 --literal-implementation",
775+
SetupType: usingImport,
776+
ExpensiveChecks: true, // Run expensive checks here to catch any issues with the literal implementation
777+
DisableDefaultScheduledBackup: true,
778+
})
779+
},
780+
})
781+
762782
r.Add(registry.TestSpec{
763783
Name: "tpcc-nowait/nodes=3/w=1",
764784
Owner: registry.OwnerTestEng,

0 commit comments

Comments
 (0)