Skip to content

Commit

Permalink
roachtest: remove rangeTs variants of import-cancellation test
Browse files Browse the repository at this point in the history
Previously the import-cancellation roachtest was split into two variants: one
with MVCC range tombstones enabled and one without. MVCC range tombstones are
always enabled now, so the two variants were effectively identical. This commit
consolidates the two tests into a single `import-cancellation` roachtest.

Informs cockroachdb#97869.
Epic: None
Release note: None
  • Loading branch information
jbowens committed Aug 10, 2023
1 parent 1f8fa96 commit 0946522
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions pkg/cmd/roachtest/tests/import_cancellation.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,23 @@ import (
)

func registerImportCancellation(r registry.Registry) {
for _, rangeTombstones := range []bool{true, false} {
r.Add(registry.TestSpec{
Name: fmt.Sprintf(`import-cancellation/rangeTs=%t`, rangeTombstones),
Owner: registry.OwnerDisasterRecovery,
Benchmark: true,
Timeout: 4 * time.Hour,
Cluster: r.MakeClusterSpec(6, spec.CPU(32)),
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.Spec().Cloud != spec.GCE {
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
}
runImportCancellation(ctx, t, c, rangeTombstones)
},
})
}
r.Add(registry.TestSpec{
Name: `import-cancellation`,
Owner: registry.OwnerDisasterRecovery,
Benchmark: true,
Timeout: 4 * time.Hour,
Cluster: r.MakeClusterSpec(6, spec.CPU(32)),
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.Spec().Cloud != spec.GCE {
t.Skip("uses gs://cockroach-fixtures; see https://github.com/cockroachdb/cockroach/issues/105968")
}
runImportCancellation(ctx, t, c)
},
})
}

func runImportCancellation(
ctx context.Context, t test.Test, c cluster.Cluster, rangeTombstones bool,
) {
func runImportCancellation(ctx context.Context, t test.Test, c cluster.Cluster) {
c.Put(ctx, t.Cockroach(), "./cockroach")
c.Put(ctx, t.DeprecatedWorkload(), "./workload") // required for tpch
c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings())
Expand Down Expand Up @@ -81,15 +77,6 @@ func runImportCancellation(
if _, err := conn.Exec(`SET CLUSTER SETTING kv.bulk_ingest.max_index_buffer_size = '2gb'`); err != nil {
t.Fatal(err)
}
// Enable MVCC Range tombstones, if required.
rtEnable := "f"
if rangeTombstones {
rtEnable = "t"
}
stmt := fmt.Sprintf(`SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = '%s'`, rtEnable)
if _, err := conn.Exec(stmt); err != nil {
t.Fatal(err)
}

seed := int64(1666467482296309000)
rng := randutil.NewTestRandWithSeed(seed)
Expand Down

0 comments on commit 0946522

Please sign in to comment.