Skip to content

Commit 08c1c7a

Browse files
craig[bot]msbutler
andcommitted
Merge #155806
155806: roachtest: run bidirectional kv ldr tests with uniform distribution r=jeffswenson a=msbutler LDR tests have been struggling to keep up with the high conflict rate that the zipfian distribution creates, which the kv workload for streaming tests recently began using. This patch ensures bidi roachtests use a uniform dist instead. Informs: #155649 Informs: #155227 Release note: none Co-authored-by: Michael Butler <butler@cockroachlabs.com>
2 parents 04fd5d7 + e85a2db commit 08c1c7a

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

pkg/cmd/roachtest/tests/cluster_to_cluster.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,11 @@ type replicateKV struct {
319319
// preparing writing statements. This is necessary to get the workload running
320320
// properly on a read only standby tenant.
321321
readOnly bool
322+
323+
// uniform makes the kv workload use a uniform key instead of zipfian.
324+
// Bidirectional LDR tests should probably use uniform to reduce conflict
325+
// rate.
326+
uniform bool
322327
}
323328

324329
func (kv replicateKV) sourceInitCmd(tenantName string, nodes option.NodeListOption) string {
@@ -342,7 +347,7 @@ func (kv replicateKV) sourceRunCmd(tenantName string, nodes option.NodeListOptio
342347
MaybeFlag(kv.debugRunDuration > 0, "duration", kv.debugRunDuration).
343348
MaybeFlag(kv.maxQPS > 0, "max-rate", kv.maxQPS).
344349
MaybeFlag(kv.readOnly, "prepare-read-only", true).
345-
Option("zipfian").
350+
MaybeOption(!kv.uniform, "zipfian").
346351
Arg("{pgurl%s:%s}", nodes, tenantName).
347352
WithEqualsSyntax()
348353
return cmd.String()

pkg/cmd/roachtest/tests/logical_data_replication.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func registerLogicalDataReplicationTests(r registry.Registry) {
9090
spec.VolumeSize(100),
9191
},
9292
},
93-
ldrConfig: ldrConfig{mode: ModeValidated},
93+
ldrConfig: ldrConfig{},
9494
run: TestLDRBasic,
9595
},
9696
{
@@ -281,7 +281,9 @@ func TestLDRBasic(
281281
maxBlockBytes: maxBlockBytes,
282282
initRows: initRows,
283283
tolerateErrors: true,
284-
initWithSplitAndScatter: !c.IsLocal()},
284+
initWithSplitAndScatter: !c.IsLocal(),
285+
uniform: true,
286+
},
285287
dbName: "kv",
286288
tableNames: []string{"kv"},
287289
}
@@ -317,6 +319,7 @@ func TestLDRSchemaChange(
317319
initRows: 1000,
318320
initWithSplitAndScatter: true,
319321
tolerateErrors: true,
322+
uniform: true,
320323
},
321324
dbName: "kv",
322325
tableNames: []string{"kv"},
@@ -589,7 +592,9 @@ func TestLDROnNodeShutdown(
589592
maxBlockBytes: 1024,
590593
initRows: 1000,
591594
tolerateErrors: true,
592-
initWithSplitAndScatter: true},
595+
initWithSplitAndScatter: true,
596+
uniform: true,
597+
},
593598
dbName: "kv",
594599
tableNames: []string{"kv"},
595600
}
@@ -707,7 +712,9 @@ func TestLDROnNetworkPartition(
707712
maxBlockBytes: 1024,
708713
initRows: 1000,
709714
tolerateErrors: true,
710-
initWithSplitAndScatter: true},
715+
initWithSplitAndScatter: true,
716+
uniform: true,
717+
},
711718
dbName: "kv",
712719
tableNames: []string{"kv"},
713720
}

0 commit comments

Comments
 (0)