@@ -29,6 +29,7 @@ const envYCSBFlags = "ROACHTEST_YCSB_FLAGS"
2929func registerYCSB (r registry.Registry ) {
3030 workloads := []string {"A" , "B" , "C" , "D" , "E" , "F" }
3131 cpusConfigs := []int {8 , 32 }
32+ cpusWithReadCommitted := 32
3233 cpusWithGlobalMVCCRangeTombstone := 32
3334
3435 // concurrencyConfigs contains near-optimal concurrency levels for each
@@ -45,7 +46,7 @@ func registerYCSB(r registry.Registry) {
4546 }
4647
4748 runYCSB := func (
48- ctx context.Context , t test.Test , c cluster.Cluster , wl string , cpus int , rangeTombstone bool ,
49+ ctx context.Context , t test.Test , c cluster.Cluster , wl string , cpus int , readCommitted , rangeTombstone bool ,
4950 ) {
5051 // For now, we only want to run the zfs tests on GCE, since only GCE supports
5152 // starting roachprod instances on zfs.
@@ -75,9 +76,11 @@ func registerYCSB(r registry.Registry) {
7576 m := c .NewMonitor (ctx , c .Range (1 , nodes ))
7677 m .Go (func (ctx context.Context ) error {
7778 var args string
78- args += fmt .Sprintf (" --select-for-update=%t" , t .IsBuildVersion ("v19.2.0" ))
7979 args += " --ramp=" + ifLocal (c , "0s" , "2m" )
8080 args += " --duration=" + ifLocal (c , "10s" , "30m" )
81+ if readCommitted {
82+ args += " --isolation-level=read_committed"
83+ }
8184 if envFlags := os .Getenv (envYCSBFlags ); envFlags != "" {
8285 args += " " + envFlags
8386 }
@@ -107,7 +110,7 @@ func registerYCSB(r registry.Registry) {
107110 Benchmark : true ,
108111 Cluster : r .MakeClusterSpec (4 , spec .CPU (cpus )),
109112 Run : func (ctx context.Context , t test.Test , c cluster.Cluster ) {
110- runYCSB (ctx , t , c , wl , cpus , false /* rangeTombstone */ )
113+ runYCSB (ctx , t , c , wl , cpus , false /* readCommitted */ , false /* rangeTombstone */ )
111114 },
112115 Tags : registry .Tags (`aws` ),
113116 })
@@ -119,19 +122,32 @@ func registerYCSB(r registry.Registry) {
119122 Benchmark : true ,
120123 Cluster : r .MakeClusterSpec (4 , spec .CPU (cpus ), spec .SetFileSystem (spec .Zfs )),
121124 Run : func (ctx context.Context , t test.Test , c cluster.Cluster ) {
122- runYCSB (ctx , t , c , wl , cpus , false /* rangeTombstone */ )
125+ runYCSB (ctx , t , c , wl , cpus , false /* readCommitted */ , false /* rangeTombstone */ )
123126 },
124127 })
125128 }
126129
130+ if cpus == cpusWithReadCommitted {
131+ r .Add (registry.TestSpec {
132+ Name : fmt .Sprintf ("%s/isolation-level=read-committed" , name ),
133+ Owner : registry .OwnerTestEng ,
134+ Benchmark : true ,
135+ Cluster : r .MakeClusterSpec (4 , spec .CPU (cpus )),
136+ Run : func (ctx context.Context , t test.Test , c cluster.Cluster ) {
137+ runYCSB (ctx , t , c , wl , cpus , true /* readCommitted */ , false /* rangeTombstone */ )
138+ },
139+ Tags : registry .Tags (`aws` ),
140+ })
141+ }
142+
127143 if cpus == cpusWithGlobalMVCCRangeTombstone {
128144 r .Add (registry.TestSpec {
129145 Name : fmt .Sprintf ("%s/mvcc-range-keys=global" , name ),
130146 Owner : registry .OwnerTestEng ,
131147 Benchmark : true ,
132148 Cluster : r .MakeClusterSpec (4 , spec .CPU (cpus )),
133149 Run : func (ctx context.Context , t test.Test , c cluster.Cluster ) {
134- runYCSB (ctx , t , c , wl , cpus , true /* rangeTombstone */ )
150+ runYCSB (ctx , t , c , wl , cpus , false /* readCommitted */ , true /* rangeTombstone */ )
135151 },
136152 Tags : registry .Tags (`aws` ),
137153 })
0 commit comments