From 9670f7c7d02409f9f81991b0e7c50b1bd2956a5d Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Fri, 12 May 2023 11:40:27 +0000 Subject: [PATCH 1/4] roachprod: add option for initial cluster settings This patch adds a roachprod option `ClusterSettingsOption` that can be used to pass arbitrary initial cluster settings during cluster start. It also no longer sets `server.remote_debugging.mode = 'any'`, since this setting was removed in 21.2. Epic: none Release note: None --- pkg/cmd/roachtest/cluster.go | 1 + pkg/roachprod/install/cluster_settings.go | 27 ++++++++++++++------ pkg/roachprod/install/cockroach.go | 30 ++++++++++++++--------- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/pkg/cmd/roachtest/cluster.go b/pkg/cmd/roachtest/cluster.go index 9601a1cb34cf..85d2651249ce 100644 --- a/pkg/cmd/roachtest/cluster.go +++ b/pkg/cmd/roachtest/cluster.go @@ -1887,6 +1887,7 @@ func (c *clusterImpl) StartE( install.EnvOption(settings.Env), install.NumRacksOption(settings.NumRacks), install.BinaryOption(settings.Binary), + install.ClusterSettingsOption(settings.ClusterSettings), } if err := roachprod.Start(ctx, l, c.MakeNodes(opts...), startOpts.RoachprodOpts, clusterSettingsOpts...); err != nil { diff --git a/pkg/roachprod/install/cluster_settings.go b/pkg/roachprod/install/cluster_settings.go index 02a8e92e472f..6984f1b32306 100644 --- a/pkg/roachprod/install/cluster_settings.go +++ b/pkg/roachprod/install/cluster_settings.go @@ -23,6 +23,9 @@ type ClusterSettings struct { NumRacks int // DebugDir is used to stash debug information. DebugDir string + // ClusterSettings are, eh, actual cluster settings, i.e. + // SET CLUSTER SETTING foo = 'bar'. The name clash is unfortunate. + ClusterSettings map[string]string } // ClusterSettingOption is the interface satisfied by options to MakeClusterSettings. @@ -30,6 +33,15 @@ type ClusterSettingOption interface { apply(settings *ClusterSettings) } +// ClusterSettingsOption adds cluster settings via SET CLUSTER SETTING. +type ClusterSettingsOption map[string]string + +func (o ClusterSettingsOption) apply(settings *ClusterSettings) { + for name, value := range o { + settings.ClusterSettings[name] = value + } +} + // TagOption is used to pass a process tag. type TagOption string @@ -95,13 +107,14 @@ func (o DebugDirOption) apply(settings *ClusterSettings) { // MakeClusterSettings makes a ClusterSettings. func MakeClusterSettings(opts ...ClusterSettingOption) ClusterSettings { clusterSettings := ClusterSettings{ - Binary: config.Binary, - Tag: "", - PGUrlCertsDir: "./certs", - Secure: false, - UseTreeDist: true, - Env: config.DefaultEnvVars(), - NumRacks: 0, + Binary: config.Binary, + Tag: "", + PGUrlCertsDir: "./certs", + Secure: false, + UseTreeDist: true, + Env: config.DefaultEnvVars(), + NumRacks: 0, + ClusterSettings: map[string]string{}, } // Override default values using the passed options (if any). for _, opt := range opts { diff --git a/pkg/roachprod/install/cockroach.go b/pkg/roachprod/install/cockroach.go index 190d7502cecf..3fbe6f0d2671 100644 --- a/pkg/roachprod/install/cockroach.go +++ b/pkg/roachprod/install/cockroach.go @@ -685,26 +685,32 @@ func (c *SyncedCluster) generateClusterSettingCmd(l *logger.Logger, node Node) s c.Name) } - var clusterSettingCmd string + clusterSettings := map[string]string{ + "cluster.organization": "Cockroach Labs - Production Testing", + "enterprise.license": config.CockroachDevLicense, + } + for name, value := range c.ClusterSettings.ClusterSettings { + clusterSettings[name] = value + } + var clusterSettingsString string + for name, value := range clusterSettings { + clusterSettingsString += fmt.Sprintf("SET CLUSTER SETTING %s = '%s';\n", name, value) + } + + var clusterSettingsCmd string if c.IsLocal() { - clusterSettingCmd = fmt.Sprintf(`cd %s ; `, c.localVMDir(node)) + clusterSettingsCmd = fmt.Sprintf(`cd %s ; `, c.localVMDir(node)) } binary := cockroachNodeBinary(c, node) path := fmt.Sprintf("%s/%s", c.NodeDir(node, 1 /* storeIndex */), "settings-initialized") url := c.NodeURL("localhost", c.NodePort(node), "" /* tenantName */) - // We ignore failures to set remote_debugging.mode, which was - // removed in v21.2. - clusterSettingCmd += fmt.Sprintf(` + clusterSettingsCmd += fmt.Sprintf(` if ! test -e %s ; then - COCKROACH_CONNECT_TIMEOUT=%d %s sql --url %s -e "SET CLUSTER SETTING server.remote_debugging.mode = 'any'" || true; - COCKROACH_CONNECT_TIMEOUT=%d %s sql --url %s -e " - SET CLUSTER SETTING cluster.organization = 'Cockroach Labs - Production Testing'; - SET CLUSTER SETTING enterprise.license = '%s';" \ - && touch %s - fi`, path, startSQLTimeout, binary, url, startSQLTimeout, binary, url, config.CockroachDevLicense, path) - return clusterSettingCmd + COCKROACH_CONNECT_TIMEOUT=%d %s sql --url %s -e "%s" && touch %s + fi`, path, startSQLTimeout, binary, url, clusterSettingsString, path) + return clusterSettingsCmd } func (c *SyncedCluster) generateInitCmd(node Node) string { From 0224d5123eda1615d9d89bf9982e3837e66999b4 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Fri, 12 May 2023 14:18:31 +0000 Subject: [PATCH 2/4] roachtest: add option for metamorphic expiration leases To increase test coverage of expiration-based leases, this patch adds an opt-in test parameter `Leases` that allows tests to enable them either metamorphically or explicitly. Epic: none Release note: None --- pkg/cmd/roachtest/cluster.go | 4 +++ pkg/cmd/roachtest/registry/test_spec.go | 33 +++++++++++++++++++++++++ pkg/cmd/roachtest/test_runner.go | 21 +++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/cluster.go b/pkg/cmd/roachtest/cluster.go index 85d2651249ce..536768b25324 100644 --- a/pkg/cmd/roachtest/cluster.go +++ b/pkg/cmd/roachtest/cluster.go @@ -662,6 +662,9 @@ type clusterImpl struct { expiration time.Time encAtRest bool // use encryption at rest + // clusterSettings are additional cluster settings set on cluster startup. + clusterSettings map[string]string + // destroyState contains state related to the cluster's destruction. destroyState destroyState } @@ -1887,6 +1890,7 @@ func (c *clusterImpl) StartE( install.EnvOption(settings.Env), install.NumRacksOption(settings.NumRacks), install.BinaryOption(settings.Binary), + install.ClusterSettingsOption(c.clusterSettings), install.ClusterSettingsOption(settings.ClusterSettings), } diff --git a/pkg/cmd/roachtest/registry/test_spec.go b/pkg/cmd/roachtest/registry/test_spec.go index d68d895d2c35..fdfafc14511e 100644 --- a/pkg/cmd/roachtest/registry/test_spec.go +++ b/pkg/cmd/roachtest/registry/test_spec.go @@ -12,6 +12,7 @@ package registry import ( "context" + "fmt" "regexp" "strings" "time" @@ -85,6 +86,10 @@ type TestSpec struct { // cannot be run with encryption enabled. EncryptionSupport EncryptionSupport + // Leases specifies the kind of leases to use for the cluster. Defaults + // to epoch leases. + Leases LeaseType + // SkipPostValidations is a bit-set of post-validations that should be skipped // after the test completes. This is useful for tests that are known to be // incompatible with some validations. By default, tests will run all @@ -181,3 +186,31 @@ func Tags(values ...string) map[string]struct{} { } return set } + +// LeaseType specifies the type of leases to use for the cluster. +type LeaseType int + +func (l LeaseType) String() string { + switch l { + case EpochLeases: + return "epoch" + case ExpirationLeases: + return "expiration" + case MetamorphicLeases: + return "metamorphic" + default: + return fmt.Sprintf("leasetype-%d", l) + } +} + +const ( + // DefaultLeases uses the default cluster lease type. + DefaultLeases = LeaseType(iota) + // EpochLeases uses epoch leases where possible. + EpochLeases + // ExpirationLeases uses expiration leases for all ranges. + ExpirationLeases + // MetamorphicLeases randomly chooses epoch or expiration + // leases (across the entire cluster) + MetamorphicLeases +) diff --git a/pkg/cmd/roachtest/test_runner.go b/pkg/cmd/roachtest/test_runner.go index 39c24979d275..ec9350a353da 100644 --- a/pkg/cmd/roachtest/test_runner.go +++ b/pkg/cmd/roachtest/test_runner.go @@ -695,7 +695,8 @@ func (r *testRunner) runWorker( // test". c.status("running test") - switch t.Spec().(*registry.TestSpec).EncryptionSupport { + testSpec := t.Spec().(*registry.TestSpec) + switch testSpec.EncryptionSupport { case registry.EncryptionAlwaysEnabled: c.encAtRest = true case registry.EncryptionAlwaysDisabled: @@ -707,6 +708,24 @@ func (r *testRunner) runWorker( c.encAtRest = prng.Float64() < encryptionProbability } + // Set initial cluster settings for this test. + c.clusterSettings = map[string]string{} + + switch testSpec.Leases { + case registry.DefaultLeases: + case registry.EpochLeases: + c.clusterSettings["kv.expiration_leases_only.enabled"] = "false" + case registry.ExpirationLeases: + c.clusterSettings["kv.expiration_leases_only.enabled"] = "true" + case registry.MetamorphicLeases: + enabled := prng.Float64() < 0.5 + c.status(fmt.Sprintf("metamorphically setting kv.expiration_leases_only.enabled = %t", + enabled)) + c.clusterSettings["kv.expiration_leases_only.enabled"] = fmt.Sprintf("%t", enabled) + default: + t.Fatalf("unknown lease type %s", testSpec.Leases) + } + wStatus.SetCluster(c) wStatus.SetTest(t, testToRun) wStatus.SetStatus("running test") From f183b2d7f564a21738333632d04e35d69f18d857 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Fri, 12 May 2023 14:22:55 +0000 Subject: [PATCH 3/4] roachtest: add TPCC benchmarks with expiration leases This patch adds TPCC benchmark variants with expiration leases for a few representative configurations. Epic: none Release note: None --- pkg/cmd/roachtest/tests/tpcc.go | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pkg/cmd/roachtest/tests/tpcc.go b/pkg/cmd/roachtest/tests/tpcc.go index 39b1ed6fafb7..893cd7b72d04 100644 --- a/pkg/cmd/roachtest/tests/tpcc.go +++ b/pkg/cmd/roachtest/tests/tpcc.go @@ -894,6 +894,35 @@ func registerTPCC(r registry.Registry) { Tags: registry.Tags(`weekly`), }) + + // Expiration lease benchmarks. These are duplicates of variants above. + registerTPCCBenchSpec(r, tpccBenchSpec{ + Nodes: 3, + CPUs: 4, + + LoadWarehouses: 1000, + EstimatedMax: gceOrAws(cloud, 750, 900), + ExpirationLeases: true, + }) + registerTPCCBenchSpec(r, tpccBenchSpec{ + Nodes: 3, + CPUs: 16, + + LoadWarehouses: gceOrAws(cloud, 3500, 3900), + EstimatedMax: gceOrAws(cloud, 2900, 3500), + ExpirationLeases: true, + Tags: registry.Tags(`aws`), + }) + registerTPCCBenchSpec(r, tpccBenchSpec{ + Nodes: 12, + CPUs: 16, + + LoadWarehouses: gceOrAws(cloud, 11500, 11500), + EstimatedMax: gceOrAws(cloud, 10000, 10000), + ExpirationLeases: true, + + Tags: registry.Tags(`weekly`), + }) } func gceOrAws(cloud string, gce, aws int) int { @@ -984,6 +1013,8 @@ type tpccBenchSpec struct { // EncryptionEnabled determines if the benchmark uses encrypted stores (i.e. // Encryption-At-Rest / EAR). EncryptionEnabled bool + // ExpirationLeases enables use of expiration-based leases. + ExpirationLeases bool } // partitions returns the number of partitions specified to the load generator. @@ -1061,6 +1092,12 @@ func registerTPCCBenchSpec(r registry.Registry, b tpccBenchSpec) { nameParts = append(nameParts, "enc=true") } + leases := registry.DefaultLeases + if b.ExpirationLeases { + leases = registry.ExpirationLeases + nameParts = append(nameParts, "lease=expiration") + } + name := strings.Join(nameParts, "/") numNodes := b.Nodes + b.LoadConfig.numLoadNodes(b.Distribution) @@ -1073,6 +1110,7 @@ func registerTPCCBenchSpec(r registry.Registry, b tpccBenchSpec) { Timeout: 7 * time.Hour, Tags: b.Tags, EncryptionSupport: encryptionSupport, + Leases: leases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCCBench(ctx, t, c, b) }, From fc68b0fe8d967ab48d96a659fd5a067787e5e734 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Fri, 12 May 2023 14:23:54 +0000 Subject: [PATCH 4/4] roachtest: enable metamorphic expiration leases in most tests This patch uses metamorphic expiration leases in most non-benchmark roachtests. There will likely be some fallout from this, in particular for timing/latency-sensitive tests, but we can deal with that as it happens. Epic: none Release note: None --- pkg/cmd/roachtest/tests/acceptance.go | 11 ++++++++--- pkg/cmd/roachtest/tests/activerecord.go | 1 + .../tests/admission_control_elastic_backup.go | 1 + .../tests/admission_control_elastic_cdc.go | 1 + .../tests/admission_control_index_overload.go | 1 + .../admission_control_multi_store_overload.go | 1 + .../admission_control_multitenant_fairness.go | 1 + .../tests/admission_control_snapshot_overload.go | 1 + .../tests/admission_control_tpcc_overload.go | 1 + pkg/cmd/roachtest/tests/allocator.go | 3 +++ pkg/cmd/roachtest/tests/alterpk.go | 3 +++ pkg/cmd/roachtest/tests/asyncpg.go | 1 + pkg/cmd/roachtest/tests/awsdms.go | 1 + pkg/cmd/roachtest/tests/backup.go | 6 ++++++ pkg/cmd/roachtest/tests/cancel.go | 2 ++ pkg/cmd/roachtest/tests/cdc.go | 15 +++++++++++++++ pkg/cmd/roachtest/tests/clearrange.go | 2 ++ pkg/cmd/roachtest/tests/clock_jump_crash.go | 1 + pkg/cmd/roachtest/tests/clock_monotonic.go | 1 + pkg/cmd/roachtest/tests/cluster_to_cluster.go | 1 + pkg/cmd/roachtest/tests/copy.go | 1 + pkg/cmd/roachtest/tests/copyfrom.go | 3 +++ pkg/cmd/roachtest/tests/costfuzz.go | 1 + pkg/cmd/roachtest/tests/decommission.go | 6 ++++++ pkg/cmd/roachtest/tests/disk_full.go | 1 + pkg/cmd/roachtest/tests/disk_stall.go | 1 + pkg/cmd/roachtest/tests/django.go | 1 + pkg/cmd/roachtest/tests/drain.go | 3 +++ pkg/cmd/roachtest/tests/drop.go | 1 + pkg/cmd/roachtest/tests/encryption.go | 1 + pkg/cmd/roachtest/tests/flowable.go | 1 + pkg/cmd/roachtest/tests/follower_reads.go | 2 ++ pkg/cmd/roachtest/tests/gopg.go | 1 + pkg/cmd/roachtest/tests/gorm.go | 1 + pkg/cmd/roachtest/tests/gossip.go | 1 + pkg/cmd/roachtest/tests/hibernate.go | 1 + pkg/cmd/roachtest/tests/hotspotsplits.go | 1 + pkg/cmd/roachtest/tests/import.go | 6 ++++++ pkg/cmd/roachtest/tests/import_cancellation.go | 1 + pkg/cmd/roachtest/tests/inconsistency.go | 1 + pkg/cmd/roachtest/tests/inverted_index.go | 1 + pkg/cmd/roachtest/tests/jasyncsql.go | 1 + pkg/cmd/roachtest/tests/jepsen.go | 1 + pkg/cmd/roachtest/tests/knex.go | 1 + pkg/cmd/roachtest/tests/kv.go | 7 +++++++ pkg/cmd/roachtest/tests/libpq.go | 1 + pkg/cmd/roachtest/tests/liquibase.go | 1 + .../roachtest/tests/loss_of_quorum_recovery.go | 2 ++ pkg/cmd/roachtest/tests/multitenant_distsql.go | 1 + .../roachtest/tests/multitenant_shared_process.go | 1 + pkg/cmd/roachtest/tests/multitenant_tpch.go | 2 ++ pkg/cmd/roachtest/tests/multitenant_upgrade.go | 1 + pkg/cmd/roachtest/tests/mvcc_gc.go | 1 + pkg/cmd/roachtest/tests/network.go | 1 + pkg/cmd/roachtest/tests/nodejs_postgres.go | 1 + pkg/cmd/roachtest/tests/npgsql.go | 1 + .../roachtest/tests/pebble_write_throughput.go | 1 + pkg/cmd/roachtest/tests/pebble_ycsb.go | 1 + pkg/cmd/roachtest/tests/pgjdbc.go | 1 + pkg/cmd/roachtest/tests/pgx.go | 1 + pkg/cmd/roachtest/tests/pop.go | 1 + pkg/cmd/roachtest/tests/process_lock.go | 1 + pkg/cmd/roachtest/tests/psycopg.go | 1 + pkg/cmd/roachtest/tests/queue.go | 1 + pkg/cmd/roachtest/tests/quit.go | 1 + pkg/cmd/roachtest/tests/rebalance_load.go | 5 +++++ pkg/cmd/roachtest/tests/replicagc.go | 1 + pkg/cmd/roachtest/tests/restart.go | 1 + pkg/cmd/roachtest/tests/restore.go | 2 ++ pkg/cmd/roachtest/tests/roachmart.go | 1 + pkg/cmd/roachtest/tests/ruby_pg.go | 1 + pkg/cmd/roachtest/tests/rust_postgres.go | 1 + pkg/cmd/roachtest/tests/schemachange.go | 4 ++++ .../roachtest/tests/schemachange_random_load.go | 1 + pkg/cmd/roachtest/tests/scrub.go | 1 + pkg/cmd/roachtest/tests/secondary_indexes.go | 1 + pkg/cmd/roachtest/tests/sequelize.go | 1 + pkg/cmd/roachtest/tests/slow_drain.go | 1 + pkg/cmd/roachtest/tests/smoketest_secure.go | 2 ++ pkg/cmd/roachtest/tests/split.go | 11 +++++++++++ pkg/cmd/roachtest/tests/sqlalchemy.go | 1 + pkg/cmd/roachtest/tests/sqlsmith.go | 1 + pkg/cmd/roachtest/tests/sstable_corruption.go | 1 + pkg/cmd/roachtest/tests/synctest.go | 1 + pkg/cmd/roachtest/tests/tlp.go | 1 + pkg/cmd/roachtest/tests/tpcc.go | 8 ++++++++ pkg/cmd/roachtest/tests/typeorm.go | 1 + ...alidate_system_schema_after_version_upgrade.go | 1 + 88 files changed, 169 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/roachtest/tests/acceptance.go b/pkg/cmd/roachtest/tests/acceptance.go index 8939edf4ee82..62a0c686e705 100644 --- a/pkg/cmd/roachtest/tests/acceptance.go +++ b/pkg/cmd/roachtest/tests/acceptance.go @@ -27,6 +27,7 @@ func registerAcceptance(r registry.Registry) { numNodes int timeout time.Duration encryptionSupport registry.EncryptionSupport + defaultLeases bool }{ registry.OwnerKV: { {name: "decommission-self", fn: runDecommissionSelf}, @@ -63,9 +64,10 @@ func registerAcceptance(r registry.Registry) { }, registry.OwnerTestEng: { { - name: "version-upgrade", - fn: runVersionUpgrade, - timeout: 30 * time.Minute, + name: "version-upgrade", + fn: runVersionUpgrade, + timeout: 30 * time.Minute, + defaultLeases: true, }, }, registry.OwnerDisasterRecovery: { @@ -105,6 +107,9 @@ func registerAcceptance(r registry.Registry) { spec.Timeout = tc.timeout } spec.EncryptionSupport = tc.encryptionSupport + if !tc.defaultLeases { + spec.Leases = registry.MetamorphicLeases + } spec.Run = func(ctx context.Context, t test.Test, c cluster.Cluster) { tc.fn(ctx, t, c) } diff --git a/pkg/cmd/roachtest/tests/activerecord.go b/pkg/cmd/roachtest/tests/activerecord.go index c89fd1a11301..c71b08619a04 100644 --- a/pkg/cmd/roachtest/tests/activerecord.go +++ b/pkg/cmd/roachtest/tests/activerecord.go @@ -249,5 +249,6 @@ func registerActiveRecord(r registry.Registry) { NativeLibs: registry.LibGEOS, Tags: registry.Tags(`default`, `orm`), Run: runActiveRecord, + Leases: registry.MetamorphicLeases, }) } diff --git a/pkg/cmd/roachtest/tests/admission_control_elastic_backup.go b/pkg/cmd/roachtest/tests/admission_control_elastic_backup.go index 42b27282dec1..97a49c431bc9 100644 --- a/pkg/cmd/roachtest/tests/admission_control_elastic_backup.go +++ b/pkg/cmd/roachtest/tests/admission_control_elastic_backup.go @@ -41,6 +41,7 @@ func registerElasticControlForBackups(r registry.Registry) { Owner: registry.OwnerAdmissionControl, Tags: registry.Tags(`weekly`), Cluster: r.MakeClusterSpec(4, spec.CPU(8)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.Spec().NodeCount < 4 { t.Fatalf("expected at least 4 nodes, found %d", c.Spec().NodeCount) diff --git a/pkg/cmd/roachtest/tests/admission_control_elastic_cdc.go b/pkg/cmd/roachtest/tests/admission_control_elastic_cdc.go index 46d3becd8c35..5b4ed15d995b 100644 --- a/pkg/cmd/roachtest/tests/admission_control_elastic_cdc.go +++ b/pkg/cmd/roachtest/tests/admission_control_elastic_cdc.go @@ -35,6 +35,7 @@ func registerElasticControlForCDC(r registry.Registry) { Tags: registry.Tags(`weekly`), Cluster: r.MakeClusterSpec(4, spec.CPU(8)), RequiresLicense: true, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.Spec().NodeCount < 4 { t.Fatalf("expected at least 4 nodes, found %d", c.Spec().NodeCount) diff --git a/pkg/cmd/roachtest/tests/admission_control_index_overload.go b/pkg/cmd/roachtest/tests/admission_control_index_overload.go index 63e12f2b1bdf..3e7b81f3eaf8 100644 --- a/pkg/cmd/roachtest/tests/admission_control_index_overload.go +++ b/pkg/cmd/roachtest/tests/admission_control_index_overload.go @@ -37,6 +37,7 @@ func registerIndexOverload(r registry.Registry) { Owner: registry.OwnerAdmissionControl, Tags: registry.Tags("weekly"), Cluster: r.MakeClusterSpec(4, spec.CPU(8)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { crdbNodes := c.Spec().NodeCount - 1 workloadNode := c.Spec().NodeCount diff --git a/pkg/cmd/roachtest/tests/admission_control_multi_store_overload.go b/pkg/cmd/roachtest/tests/admission_control_multi_store_overload.go index 76be9de703e8..0a545ebd28e1 100644 --- a/pkg/cmd/roachtest/tests/admission_control_multi_store_overload.go +++ b/pkg/cmd/roachtest/tests/admission_control_multi_store_overload.go @@ -96,6 +96,7 @@ func registerMultiStoreOverload(r registry.Registry) { Owner: registry.OwnerAdmissionControl, Tags: registry.Tags(`weekly`), Cluster: r.MakeClusterSpec(2, spec.CPU(8), spec.SSD(2)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runKV(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/admission_control_multitenant_fairness.go b/pkg/cmd/roachtest/tests/admission_control_multitenant_fairness.go index 947187abdff4..f825cd3b204a 100644 --- a/pkg/cmd/roachtest/tests/admission_control_multitenant_fairness.go +++ b/pkg/cmd/roachtest/tests/admission_control_multitenant_fairness.go @@ -90,6 +90,7 @@ func registerMultiTenantFairness(r registry.Registry) { Name: fmt.Sprintf("admission-control/multitenant-fairness/%s", s.name), Cluster: r.MakeClusterSpec(5), Owner: registry.OwnerAdmissionControl, + Leases: registry.MetamorphicLeases, NonReleaseBlocker: false, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runMultiTenantFairness(ctx, t, c, s) diff --git a/pkg/cmd/roachtest/tests/admission_control_snapshot_overload.go b/pkg/cmd/roachtest/tests/admission_control_snapshot_overload.go index 049bfb0b55c5..002ba4b6c261 100644 --- a/pkg/cmd/roachtest/tests/admission_control_snapshot_overload.go +++ b/pkg/cmd/roachtest/tests/admission_control_snapshot_overload.go @@ -43,6 +43,7 @@ func registerSnapshotOverload(r registry.Registry) { Owner: registry.OwnerAdmissionControl, Tags: registry.Tags(`weekly`), Cluster: r.MakeClusterSpec(4, spec.CPU(8)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.Spec().NodeCount < 4 { t.Fatalf("expected at least 4 nodes, found %d", c.Spec().NodeCount) diff --git a/pkg/cmd/roachtest/tests/admission_control_tpcc_overload.go b/pkg/cmd/roachtest/tests/admission_control_tpcc_overload.go index c078325cdcdc..72c99aa6f2bf 100644 --- a/pkg/cmd/roachtest/tests/admission_control_tpcc_overload.go +++ b/pkg/cmd/roachtest/tests/admission_control_tpcc_overload.go @@ -168,6 +168,7 @@ func registerTPCCOverload(r registry.Registry) { Cluster: r.MakeClusterSpec(s.Nodes+1, spec.CPU(s.CPUs)), Run: s.run, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Timeout: 20 * time.Minute, }) } diff --git a/pkg/cmd/roachtest/tests/allocator.go b/pkg/cmd/roachtest/tests/allocator.go index b5d374ab5ed1..a1597bb57d13 100644 --- a/pkg/cmd/roachtest/tests/allocator.go +++ b/pkg/cmd/roachtest/tests/allocator.go @@ -151,6 +151,7 @@ func registerAllocator(r registry.Registry) { Name: `replicate/up/1to3`, Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runAllocator(ctx, t, c, 1, 10.0) }, @@ -159,6 +160,7 @@ func registerAllocator(r registry.Registry) { Name: `replicate/rebalance/3to5`, Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(6), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runAllocator(ctx, t, c, 3, 42.0) }, @@ -168,6 +170,7 @@ func registerAllocator(r registry.Registry) { Owner: registry.OwnerKV, Timeout: 10 * time.Minute, Cluster: r.MakeClusterSpec(9, spec.CPU(1)), + Leases: registry.MetamorphicLeases, Run: runWideReplication, }) } diff --git a/pkg/cmd/roachtest/tests/alterpk.go b/pkg/cmd/roachtest/tests/alterpk.go index 309fcc1e2eed..a61293c89881 100644 --- a/pkg/cmd/roachtest/tests/alterpk.go +++ b/pkg/cmd/roachtest/tests/alterpk.go @@ -183,6 +183,7 @@ func registerAlterPK(r registry.Registry) { // Use a 4 node cluster -- 3 nodes will run cockroach, and the last will be the // workload driver node. Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: runAlterPKBank, }) r.Add(registry.TestSpec{ @@ -191,6 +192,7 @@ func registerAlterPK(r registry.Registry) { // Use a 4 node cluster -- 3 nodes will run cockroach, and the last will be the // workload driver node. Cluster: r.MakeClusterSpec(4, spec.CPU(32)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runAlterPKTPCC(ctx, t, c, 250 /* warehouses */, true /* expensiveChecks */) }, @@ -201,6 +203,7 @@ func registerAlterPK(r registry.Registry) { // Use a 4 node cluster -- 3 nodes will run cockroach, and the last will be the // workload driver node. Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runAlterPKTPCC(ctx, t, c, 500 /* warehouses */, false /* expensiveChecks */) }, diff --git a/pkg/cmd/roachtest/tests/asyncpg.go b/pkg/cmd/roachtest/tests/asyncpg.go index e6543639b24b..9b4581538fd4 100644 --- a/pkg/cmd/roachtest/tests/asyncpg.go +++ b/pkg/cmd/roachtest/tests/asyncpg.go @@ -142,6 +142,7 @@ func registerAsyncpg(r registry.Registry) { Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1, spec.CPU(16)), Tags: registry.Tags(`default`, `orm`), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runAsyncpg(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/awsdms.go b/pkg/cmd/roachtest/tests/awsdms.go index ccc00362498e..59c5ff5a81de 100644 --- a/pkg/cmd/roachtest/tests/awsdms.go +++ b/pkg/cmd/roachtest/tests/awsdms.go @@ -191,6 +191,7 @@ func registerAWSDMS(r registry.Registry) { Name: "awsdms", Owner: registry.OwnerSQLSessions, // TODO(otan): add a migrations OWNERS team Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `awsdms`, `aws`), Run: runAWSDMS, }) diff --git a/pkg/cmd/roachtest/tests/backup.go b/pkg/cmd/roachtest/tests/backup.go index 5b13798cfb6a..84b80075ca9a 100644 --- a/pkg/cmd/roachtest/tests/backup.go +++ b/pkg/cmd/roachtest/tests/backup.go @@ -216,6 +216,7 @@ func registerBackupNodeShutdown(r registry.Registry) { Owner: registry.OwnerDisasterRecovery, Cluster: backupNodeRestartSpec, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { gatewayNode := 2 nodeToShutdown := 3 @@ -237,6 +238,7 @@ func registerBackupNodeShutdown(r registry.Registry) { Owner: registry.OwnerDisasterRecovery, Cluster: backupNodeRestartSpec, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { gatewayNode := 2 nodeToShutdown := 2 @@ -432,6 +434,7 @@ func registerBackup(r registry.Registry) { Owner: registry.OwnerDisasterRecovery, Cluster: r.MakeClusterSpec(3), EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.Spec().Cloud != item.machine { t.Skip("backup assumeRole is only configured to run on "+item.machine, "") @@ -538,6 +541,7 @@ func registerBackup(r registry.Registry) { Owner: registry.OwnerDisasterRecovery, Cluster: KMSSpec, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Tags: item.tags, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.Spec().Cloud != item.machine { @@ -671,6 +675,7 @@ func registerBackup(r registry.Registry) { Name: `backupTPCC`, Owner: registry.OwnerDisasterRecovery, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, Timeout: 1 * time.Hour, EncryptionSupport: registry.EncryptionMetamorphic, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { @@ -877,6 +882,7 @@ func registerBackup(r registry.Registry) { Owner: registry.OwnerDisasterRecovery, Timeout: 4 * time.Hour, Cluster: r.MakeClusterSpec(3, spec.CPU(8)), + Leases: registry.MetamorphicLeases, EncryptionSupport: registry.EncryptionMetamorphic, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runBackupMVCCRangeTombstones(ctx, t, c, mvccRangeTombstoneConfig{}) diff --git a/pkg/cmd/roachtest/tests/cancel.go b/pkg/cmd/roachtest/tests/cancel.go index b73d5536072a..065ff216134d 100644 --- a/pkg/cmd/roachtest/tests/cancel.go +++ b/pkg/cmd/roachtest/tests/cancel.go @@ -139,6 +139,7 @@ func registerCancel(r registry.Registry) { Name: fmt.Sprintf("cancel/tpch/distsql/queries=%s,nodes=%d", queries, numNodes), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCancel(ctx, t, c, tpchQueriesToRun, true /* useDistsql */) }, @@ -148,6 +149,7 @@ func registerCancel(r registry.Registry) { Name: fmt.Sprintf("cancel/tpch/local/queries=%s,nodes=%d", queries, numNodes), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCancel(ctx, t, c, tpchQueriesToRun, false /* useDistsql */) }, diff --git a/pkg/cmd/roachtest/tests/cdc.go b/pkg/cmd/roachtest/tests/cdc.go index 9489f4b04bc9..0129353a24ef 100644 --- a/pkg/cmd/roachtest/tests/cdc.go +++ b/pkg/cmd/roachtest/tests/cdc.go @@ -966,6 +966,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/tpcc-1000", Owner: registry.OwnerCDC, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -989,6 +990,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/tpcc-1000/sink=null", Owner: registry.OwnerCDC, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, Tags: registry.Tags("manual"), RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { @@ -1013,6 +1015,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/initial-scan", Owner: registry.OwnerCDC, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1032,6 +1035,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/sink-chaos", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1056,6 +1060,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/crdb-chaos", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1085,6 +1090,7 @@ func registerCDC(r registry.Registry) { // but this cannot be allocated without some sort of configuration outside // of this test. Look into it. Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1116,6 +1122,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/cloud-sink-gcs/rangefeed=true", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1142,6 +1149,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/pubsub-sink", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1177,6 +1185,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/pubsub-sink/assume-role", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1209,6 +1218,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/cloud-sink-gcs/assume-role", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1232,6 +1242,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/webhook-sink", Owner: `cdc`, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1264,6 +1275,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/kafka-auth", Owner: `cdc`, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCDCKafkaAuth(ctx, t, c) @@ -1273,6 +1285,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/kafka-oauth", Owner: `cdc`, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { ct := newCDCTester(ctx, t, c) @@ -1307,6 +1320,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/bank", Owner: `cdc`, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Timeout: 30 * time.Minute, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { @@ -1317,6 +1331,7 @@ func registerCDC(r registry.Registry) { Name: "cdc/schemareg", Owner: `cdc`, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, RequiresLicense: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCDCSchemaRegistry(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/clearrange.go b/pkg/cmd/roachtest/tests/clearrange.go index 6e622cd71bbb..a057a0214fd1 100644 --- a/pkg/cmd/roachtest/tests/clearrange.go +++ b/pkg/cmd/roachtest/tests/clearrange.go @@ -37,6 +37,7 @@ func registerClearRange(r registry.Registry) { // to <3:30h but it varies. Timeout: 5*time.Hour + 90*time.Minute, Cluster: r.MakeClusterSpec(10, spec.CPU(16)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runClearRange(ctx, t, c, checks, rangeTombstones) }, @@ -54,6 +55,7 @@ func registerClearRange(r registry.Registry) { Timeout: 5*time.Hour + 120*time.Minute, Cluster: r.MakeClusterSpec(10, spec.CPU(16), spec.SetFileSystem(spec.Zfs)), EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runClearRange(ctx, t, c, checks, rangeTombstones) }, diff --git a/pkg/cmd/roachtest/tests/clock_jump_crash.go b/pkg/cmd/roachtest/tests/clock_jump_crash.go index 3e2d8f4ca334..21d1a4747bbb 100644 --- a/pkg/cmd/roachtest/tests/clock_jump_crash.go +++ b/pkg/cmd/roachtest/tests/clock_jump_crash.go @@ -139,6 +139,7 @@ func registerClockJumpTests(r registry.Registry) { // These tests muck with NTP, therefore we don't want the cluster reused // by others. Cluster: r.MakeClusterSpec(1, spec.ReuseTagged("offset-injector"), spec.TerminateOnMigration()), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runClockJump(ctx, t, c, tc) }, diff --git a/pkg/cmd/roachtest/tests/clock_monotonic.go b/pkg/cmd/roachtest/tests/clock_monotonic.go index c9634defb2f4..379ec398c548 100644 --- a/pkg/cmd/roachtest/tests/clock_monotonic.go +++ b/pkg/cmd/roachtest/tests/clock_monotonic.go @@ -141,6 +141,7 @@ func registerClockMonotonicTests(r registry.Registry) { // These tests muck with NTP, therefor we don't want the cluster reused by // others. Cluster: r.MakeClusterSpec(1, spec.ReuseTagged("offset-injector"), spec.TerminateOnMigration()), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runClockMonotonicity(ctx, t, c, tc) }, diff --git a/pkg/cmd/roachtest/tests/cluster_to_cluster.go b/pkg/cmd/roachtest/tests/cluster_to_cluster.go index e87a73bbdf45..cce7ceb8ff51 100644 --- a/pkg/cmd/roachtest/tests/cluster_to_cluster.go +++ b/pkg/cmd/roachtest/tests/cluster_to_cluster.go @@ -714,6 +714,7 @@ func c2cRegisterWrapper( Name: sp.name, Owner: registry.OwnerDisasterRecovery, Cluster: r.MakeClusterSpec(sp.dstNodes+sp.srcNodes+1, clusterOps...), + Leases: registry.MetamorphicLeases, Timeout: sp.timeout, Skip: sp.skip, Tags: sp.tags, diff --git a/pkg/cmd/roachtest/tests/copy.go b/pkg/cmd/roachtest/tests/copy.go index 5a4f219984e9..6031f6c8d1f8 100644 --- a/pkg/cmd/roachtest/tests/copy.go +++ b/pkg/cmd/roachtest/tests/copy.go @@ -182,6 +182,7 @@ func registerCopy(r registry.Registry) { Name: fmt.Sprintf("copy/bank/rows=%d,nodes=%d,txn=%t", tc.rows, tc.nodes, tc.txn), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(tc.nodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCopy(ctx, t, c, tc.rows, tc.txn) }, diff --git a/pkg/cmd/roachtest/tests/copyfrom.go b/pkg/cmd/roachtest/tests/copyfrom.go index 77abab7ce128..b55a9a92760e 100644 --- a/pkg/cmd/roachtest/tests/copyfrom.go +++ b/pkg/cmd/roachtest/tests/copyfrom.go @@ -159,6 +159,7 @@ func registerCopyFrom(r registry.Registry) { Name: fmt.Sprintf("copyfrom/crdb-atomic/sf=%d/nodes=%d", tc.sf, tc.nodes), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(tc.nodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCopyFromCRDB(ctx, t, c, tc.sf, true /*atomic*/) }, @@ -167,6 +168,7 @@ func registerCopyFrom(r registry.Registry) { Name: fmt.Sprintf("copyfrom/crdb-nonatomic/sf=%d/nodes=%d", tc.sf, tc.nodes), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(tc.nodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCopyFromCRDB(ctx, t, c, tc.sf, false /*atomic*/) }, @@ -175,6 +177,7 @@ func registerCopyFrom(r registry.Registry) { Name: fmt.Sprintf("copyfrom/pg/sf=%d/nodes=%d", tc.sf, tc.nodes), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(tc.nodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runCopyFromPG(ctx, t, c, tc.sf) }, diff --git a/pkg/cmd/roachtest/tests/costfuzz.go b/pkg/cmd/roachtest/tests/costfuzz.go index 987eab3a333c..1a1291826f4f 100644 --- a/pkg/cmd/roachtest/tests/costfuzz.go +++ b/pkg/cmd/roachtest/tests/costfuzz.go @@ -42,6 +42,7 @@ func registerCostFuzz(r registry.Registry) { RequiresLicense: true, Tags: nil, Cluster: clusterSpec, + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runQueryComparison(ctx, t, c, &queryComparisonTest{ diff --git a/pkg/cmd/roachtest/tests/decommission.go b/pkg/cmd/roachtest/tests/decommission.go index cfc117e40ec0..64294203d982 100644 --- a/pkg/cmd/roachtest/tests/decommission.go +++ b/pkg/cmd/roachtest/tests/decommission.go @@ -48,6 +48,7 @@ func registerDecommission(r registry.Registry) { Name: fmt.Sprintf("decommission/nodes=%d/duration=%s", numNodes, duration), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { duration = 5 * time.Minute @@ -64,6 +65,7 @@ func registerDecommission(r registry.Registry) { Name: fmt.Sprintf("drain-and-decommission/nodes=%d", numNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runDrainAndDecommission(ctx, t, c, numNodes, duration) }, @@ -75,6 +77,7 @@ func registerDecommission(r registry.Registry) { Name: "decommission/drains", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runDecommissionDrains(ctx, t, c) }, @@ -87,6 +90,7 @@ func registerDecommission(r registry.Registry) { Owner: registry.OwnerKV, Timeout: 10 * time.Minute, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runDecommissionRandomized(ctx, t, c) }, @@ -98,6 +102,7 @@ func registerDecommission(r registry.Registry) { Name: "decommission/mixed-versions", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() && runtime.GOARCH == "arm64" { t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/89268") @@ -112,6 +117,7 @@ func registerDecommission(r registry.Registry) { Name: "decommission/slow", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runDecommissionSlow(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/disk_full.go b/pkg/cmd/roachtest/tests/disk_full.go index f33f2ccf8d75..4c3377acc15b 100644 --- a/pkg/cmd/roachtest/tests/disk_full.go +++ b/pkg/cmd/roachtest/tests/disk_full.go @@ -30,6 +30,7 @@ func registerDiskFull(r registry.Registry) { Name: "disk-full", Owner: registry.OwnerStorage, Cluster: r.MakeClusterSpec(5), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { t.Skip("you probably don't want to fill your local disk") diff --git a/pkg/cmd/roachtest/tests/disk_stall.go b/pkg/cmd/roachtest/tests/disk_stall.go index 13eee2858266..18b2092b825e 100644 --- a/pkg/cmd/roachtest/tests/disk_stall.go +++ b/pkg/cmd/roachtest/tests/disk_stall.go @@ -68,6 +68,7 @@ func registerDiskStalledDetection(r registry.Registry) { // the encryption-at-rest implementation that could indefinitely // stall the process during a disk stall. EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, }) } } diff --git a/pkg/cmd/roachtest/tests/django.go b/pkg/cmd/roachtest/tests/django.go index 646c9719044f..b8dd1be2e468 100644 --- a/pkg/cmd/roachtest/tests/django.go +++ b/pkg/cmd/roachtest/tests/django.go @@ -217,6 +217,7 @@ func registerDjango(r registry.Registry) { Name: "django", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1, spec.CPU(16)), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runDjango(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/drain.go b/pkg/cmd/roachtest/tests/drain.go index 71df5b6db70a..52a76275a390 100644 --- a/pkg/cmd/roachtest/tests/drain.go +++ b/pkg/cmd/roachtest/tests/drain.go @@ -40,6 +40,7 @@ func registerDrain(r registry.Registry) { Name: "drain/early-exit-conn-wait", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runEarlyExitInConnectionWait(ctx, t, c) }, @@ -49,6 +50,7 @@ func registerDrain(r registry.Registry) { Name: "drain/warn-conn-wait-timeout", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runWarningForConnWait(ctx, t, c) }, @@ -58,6 +60,7 @@ func registerDrain(r registry.Registry) { Name: "drain/not-at-quorum", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, SkipPostValidations: registry.PostValidationNoDeadNodes, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runClusterNotAtQuorum(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/drop.go b/pkg/cmd/roachtest/tests/drop.go index 9a11f0579781..7945ccdd1375 100644 --- a/pkg/cmd/roachtest/tests/drop.go +++ b/pkg/cmd/roachtest/tests/drop.go @@ -165,6 +165,7 @@ func registerDrop(r registry.Registry) { Name: fmt.Sprintf("drop/tpcc/w=%d,nodes=%d", warehouses, numNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { // NB: this is likely not going to work out in `-local` mode. Edit the // numbers during iteration. diff --git a/pkg/cmd/roachtest/tests/encryption.go b/pkg/cmd/roachtest/tests/encryption.go index 92f12ac2262b..460622cf2bde 100644 --- a/pkg/cmd/roachtest/tests/encryption.go +++ b/pkg/cmd/roachtest/tests/encryption.go @@ -86,6 +86,7 @@ func registerEncryption(r registry.Registry) { r.Add(registry.TestSpec{ Name: fmt.Sprintf("encryption/nodes=%d", n), EncryptionSupport: registry.EncryptionAlwaysEnabled, + Leases: registry.MetamorphicLeases, Owner: registry.OwnerStorage, Cluster: r.MakeClusterSpec(n), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/flowable.go b/pkg/cmd/roachtest/tests/flowable.go index 44ac76413ae8..b2d5b180139c 100644 --- a/pkg/cmd/roachtest/tests/flowable.go +++ b/pkg/cmd/roachtest/tests/flowable.go @@ -106,6 +106,7 @@ func registerFlowable(r registry.Registry) { Name: "flowable", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runFlowable(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/follower_reads.go b/pkg/cmd/roachtest/tests/follower_reads.go index 50680ad89128..860174a36be0 100644 --- a/pkg/cmd/roachtest/tests/follower_reads.go +++ b/pkg/cmd/roachtest/tests/follower_reads.go @@ -63,6 +63,7 @@ func registerFollowerReads(r registry.Registry) { spec.Geo(), spec.Zones("us-east1-b,us-east1-b,us-east1-b,us-west1-b,us-west1-b,europe-west2-b"), ), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { c.Put(ctx, t.Cockroach(), "./cockroach") c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings()) @@ -101,6 +102,7 @@ func registerFollowerReads(r registry.Registry) { 3, /* nodeCount */ spec.CPU(2), ), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() && runtime.GOARCH == "arm64" { t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/89268") diff --git a/pkg/cmd/roachtest/tests/gopg.go b/pkg/cmd/roachtest/tests/gopg.go index 3a4dc6d92547..c5f58ab899c9 100644 --- a/pkg/cmd/roachtest/tests/gopg.go +++ b/pkg/cmd/roachtest/tests/gopg.go @@ -158,6 +158,7 @@ func registerGopg(r registry.Registry) { Name: "gopg", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runGopg(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/gorm.go b/pkg/cmd/roachtest/tests/gorm.go index a5a402b017d3..86d820315240 100644 --- a/pkg/cmd/roachtest/tests/gorm.go +++ b/pkg/cmd/roachtest/tests/gorm.go @@ -136,6 +136,7 @@ func registerGORM(r registry.Registry) { Name: "gorm", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: runGORM, }) diff --git a/pkg/cmd/roachtest/tests/gossip.go b/pkg/cmd/roachtest/tests/gossip.go index b0c616bc4628..3c2506eae234 100644 --- a/pkg/cmd/roachtest/tests/gossip.go +++ b/pkg/cmd/roachtest/tests/gossip.go @@ -144,6 +144,7 @@ SELECT node_id Name: "gossip/chaos/nodes=9", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(9), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runGossipChaos(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/hibernate.go b/pkg/cmd/roachtest/tests/hibernate.go index fa583b71cd9f..228aee4fbb42 100644 --- a/pkg/cmd/roachtest/tests/hibernate.go +++ b/pkg/cmd/roachtest/tests/hibernate.go @@ -246,6 +246,7 @@ func registerHibernate(r registry.Registry, opt hibernateOptions) { Name: opt.testName, Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/hotspotsplits.go b/pkg/cmd/roachtest/tests/hotspotsplits.go index 9604ab5b1925..97dcef05a67f 100644 --- a/pkg/cmd/roachtest/tests/hotspotsplits.go +++ b/pkg/cmd/roachtest/tests/hotspotsplits.go @@ -99,6 +99,7 @@ func registerHotSpotSplits(r registry.Registry) { // No problem in 20.1 thanks to: // https://github.com/cockroachdb/cockroach/pull/45323. Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { concurrency = 32 diff --git a/pkg/cmd/roachtest/tests/import.go b/pkg/cmd/roachtest/tests/import.go index 92c9c7171895..e6bd1915c018 100644 --- a/pkg/cmd/roachtest/tests/import.go +++ b/pkg/cmd/roachtest/tests/import.go @@ -89,6 +89,7 @@ func registerImportNodeShutdown(r registry.Registry) { Name: "import/nodeShutdown/worker", Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { c.Put(ctx, t.Cockroach(), "./cockroach") c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings()) @@ -103,6 +104,7 @@ func registerImportNodeShutdown(r registry.Registry) { Name: "import/nodeShutdown/coordinator", Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { c.Put(ctx, t.Cockroach(), "./cockroach") c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings()) @@ -181,6 +183,7 @@ func registerImportTPCC(r registry.Registry) { Cluster: r.MakeClusterSpec(8, spec.CPU(16), spec.Geo(), spec.Zones(geoZones)), Timeout: 5 * time.Hour, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runImportTPCC(ctx, t, c, fmt.Sprintf("import/tpcc/warehouses=%d/geo", geoWarehouses), 5*time.Hour, geoWarehouses) @@ -213,6 +216,7 @@ func registerImportTPCH(r registry.Registry) { Cluster: r.MakeClusterSpec(item.nodes), Timeout: item.timeout, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { tick, perfBuf := initBulkJobPerfArtifacts(t.Name(), item.timeout) @@ -352,6 +356,7 @@ func registerImportMixedVersion(r registry.Registry) { Owner: registry.OwnerSQLQueries, // Mixed-version support was added in 21.1. Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() && runtime.GOARCH == "arm64" { t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/89268") @@ -398,6 +403,7 @@ func registerImportDecommissioned(r registry.Registry) { Name: "import/decommissioned", Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: runImportDecommissioned, }) } diff --git a/pkg/cmd/roachtest/tests/import_cancellation.go b/pkg/cmd/roachtest/tests/import_cancellation.go index f854b144a83b..87cc7f801508 100644 --- a/pkg/cmd/roachtest/tests/import_cancellation.go +++ b/pkg/cmd/roachtest/tests/import_cancellation.go @@ -35,6 +35,7 @@ func registerImportCancellation(r registry.Registry) { Owner: registry.OwnerDisasterRecovery, 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) { runImportCancellation(ctx, t, c, rangeTombstones) }, diff --git a/pkg/cmd/roachtest/tests/inconsistency.go b/pkg/cmd/roachtest/tests/inconsistency.go index 4c4a95034128..9ac12a566e0d 100644 --- a/pkg/cmd/roachtest/tests/inconsistency.go +++ b/pkg/cmd/roachtest/tests/inconsistency.go @@ -27,6 +27,7 @@ func registerInconsistency(r registry.Registry) { Name: "inconsistency", Owner: registry.OwnerReplication, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, Run: runInconsistency, }) } diff --git a/pkg/cmd/roachtest/tests/inverted_index.go b/pkg/cmd/roachtest/tests/inverted_index.go index 49dfdebdb843..2fb2cde33d0a 100644 --- a/pkg/cmd/roachtest/tests/inverted_index.go +++ b/pkg/cmd/roachtest/tests/inverted_index.go @@ -28,6 +28,7 @@ func registerSchemaChangeInvertedIndex(r registry.Registry) { Name: "schemachange/invertedindex", Owner: registry.OwnerSQLSchema, Cluster: r.MakeClusterSpec(5), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runSchemaChangeInvertedIndex(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/jasyncsql.go b/pkg/cmd/roachtest/tests/jasyncsql.go index 36954f7c3d35..1ea921c0c202 100644 --- a/pkg/cmd/roachtest/tests/jasyncsql.go +++ b/pkg/cmd/roachtest/tests/jasyncsql.go @@ -143,6 +143,7 @@ func registerJasyncSQL(r registry.Registry) { Name: "jasync", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runJasyncSQL(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/jepsen.go b/pkg/cmd/roachtest/tests/jepsen.go index dbba02c2ffa3..137f64791cb4 100644 --- a/pkg/cmd/roachtest/tests/jepsen.go +++ b/pkg/cmd/roachtest/tests/jepsen.go @@ -491,6 +491,7 @@ func registerJepsen(r registry.Registry) { // if they detect that the machines have already been properly // initialized. Cluster: r.MakeClusterSpec(6, spec.ReuseTagged("jepsen")), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runJepsen(ctx, t, c, testName, nemesis.config) }, diff --git a/pkg/cmd/roachtest/tests/knex.go b/pkg/cmd/roachtest/tests/knex.go index 4b1f80f4f6c6..712bf6835cc0 100644 --- a/pkg/cmd/roachtest/tests/knex.go +++ b/pkg/cmd/roachtest/tests/knex.go @@ -130,6 +130,7 @@ func registerKnex(r registry.Registry) { Name: "knex", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/kv.go b/pkg/cmd/roachtest/tests/kv.go index e1e4e0c6b6f1..3d8dcf1f17f0 100644 --- a/pkg/cmd/roachtest/tests/kv.go +++ b/pkg/cmd/roachtest/tests/kv.go @@ -344,6 +344,7 @@ func registerKVContention(r registry.Registry) { Name: fmt.Sprintf("kv/contention/nodes=%d", nodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(nodes + 1), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { c.Put(ctx, t.Cockroach(), "./cockroach", c.Range(1, nodes)) c.Put(ctx, t.DeprecatedWorkload(), "./workload", c.Node(nodes+1)) @@ -413,6 +414,7 @@ func registerKVQuiescenceDead(r registry.Registry) { Name: "kv/quiescence/nodes=3", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, SkipPostValidations: registry.PostValidationNoDeadNodes, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { nodes := c.Spec().NodeCount - 1 @@ -488,6 +490,7 @@ func registerKVGracefulDraining(r registry.Registry) { Name: "kv/gracefuldraining/nodes=3", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { nodes := c.Spec().NodeCount - 1 c.Put(ctx, t.Cockroach(), "./cockroach", c.Range(1, nodes)) @@ -715,6 +718,7 @@ func registerKVSplits(r registry.Registry) { Owner: registry.OwnerKV, Timeout: item.timeout, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { nodes := c.Spec().NodeCount - 1 c.Put(ctx, t.Cockroach(), "./cockroach", c.Range(1, nodes)) @@ -782,6 +786,7 @@ func registerKVScalability(r registry.Registry) { Name: fmt.Sprintf("kv%d/scale/nodes=6", p), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(7, spec.CPU(8)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runScalability(ctx, t, c, p) }, @@ -917,6 +922,7 @@ func registerKVRangeLookups(r registry.Registry) { Name: fmt.Sprintf("kv50/rangelookups/%s/nodes=%d", workloadName, nodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(nodes+1, spec.CPU(cpus)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runRangeLookups(ctx, t, c, item.workers, item.workloadType, item.maximumRangeLookupsPerSec) }, @@ -958,6 +964,7 @@ func registerKVRestartImpact(r registry.Registry) { Tags: registry.Tags(`weekly`), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(13, spec.CPU(8)), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { nodes := c.Spec().NodeCount - 1 workloadNode := c.Spec().NodeCount diff --git a/pkg/cmd/roachtest/tests/libpq.go b/pkg/cmd/roachtest/tests/libpq.go index 2693593419d4..8312591fa6a2 100644 --- a/pkg/cmd/roachtest/tests/libpq.go +++ b/pkg/cmd/roachtest/tests/libpq.go @@ -138,6 +138,7 @@ func registerLibPQ(r registry.Registry) { Name: "lib/pq", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `driver`), Run: runLibPQ, }) diff --git a/pkg/cmd/roachtest/tests/liquibase.go b/pkg/cmd/roachtest/tests/liquibase.go index 904e8abf5c98..3e72b330034b 100644 --- a/pkg/cmd/roachtest/tests/liquibase.go +++ b/pkg/cmd/roachtest/tests/liquibase.go @@ -134,6 +134,7 @@ func registerLiquibase(r registry.Registry) { Name: "liquibase", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `tool`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLiquibase(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/loss_of_quorum_recovery.go b/pkg/cmd/roachtest/tests/loss_of_quorum_recovery.go index a6aa73809e0d..1a536c3a727d 100644 --- a/pkg/cmd/roachtest/tests/loss_of_quorum_recovery.go +++ b/pkg/cmd/roachtest/tests/loss_of_quorum_recovery.go @@ -73,6 +73,7 @@ func registerLOQRecovery(r registry.Registry) { Owner: registry.OwnerReplication, Tags: registry.Tags(`default`), Cluster: spec, + Leases: registry.MetamorphicLeases, SkipPostValidations: registry.PostValidationInvalidDescriptors | registry.PostValidationNoDeadNodes, NonReleaseBlocker: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { @@ -84,6 +85,7 @@ func registerLOQRecovery(r registry.Registry) { Owner: registry.OwnerReplication, Tags: registry.Tags(`default`), Cluster: spec, + Leases: registry.MetamorphicLeases, SkipPostValidations: registry.PostValidationInvalidDescriptors | registry.PostValidationNoDeadNodes, NonReleaseBlocker: true, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/multitenant_distsql.go b/pkg/cmd/roachtest/tests/multitenant_distsql.go index ce7a652ff0cb..6805ee496a01 100644 --- a/pkg/cmd/roachtest/tests/multitenant_distsql.go +++ b/pkg/cmd/roachtest/tests/multitenant_distsql.go @@ -41,6 +41,7 @@ func registerMultiTenantDistSQL(r registry.Registry) { Name: fmt.Sprintf("multitenant/distsql/instances=%d/bundle=%s/timeout=%d", numInstances, b, to), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(4), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runMultiTenantDistSQL(ctx, t, c, numInstances, b == "on", to) }, diff --git a/pkg/cmd/roachtest/tests/multitenant_shared_process.go b/pkg/cmd/roachtest/tests/multitenant_shared_process.go index 15bb67da19e5..9a1f33f7b3cb 100644 --- a/pkg/cmd/roachtest/tests/multitenant_shared_process.go +++ b/pkg/cmd/roachtest/tests/multitenant_shared_process.go @@ -30,6 +30,7 @@ func registerMultiTenantSharedProcess(r registry.Registry) { Name: "multitenant/shared-process/basic", Owner: registry.OwnerMultiTenant, Cluster: r.MakeClusterSpec(crdbNodeCount + 1), + Leases: registry.MetamorphicLeases, Timeout: 1 * time.Hour, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { var ( diff --git a/pkg/cmd/roachtest/tests/multitenant_tpch.go b/pkg/cmd/roachtest/tests/multitenant_tpch.go index 549112750d7d..0911d3aa2b11 100644 --- a/pkg/cmd/roachtest/tests/multitenant_tpch.go +++ b/pkg/cmd/roachtest/tests/multitenant_tpch.go @@ -120,6 +120,7 @@ func registerMultiTenantTPCH(r registry.Registry) { Name: "multitenant/tpch", Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(1 /* nodeCount */), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runMultiTenantTPCH(ctx, t, c, false /* enableDirectScans */) }, @@ -128,6 +129,7 @@ func registerMultiTenantTPCH(r registry.Registry) { Name: "multitenant/tpch_direct_scans", Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(1 /* nodeCount */), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runMultiTenantTPCH(ctx, t, c, true /* enableDirectScans */) }, diff --git a/pkg/cmd/roachtest/tests/multitenant_upgrade.go b/pkg/cmd/roachtest/tests/multitenant_upgrade.go index 24e7390f1d15..624b0e419e22 100644 --- a/pkg/cmd/roachtest/tests/multitenant_upgrade.go +++ b/pkg/cmd/roachtest/tests/multitenant_upgrade.go @@ -32,6 +32,7 @@ func registerMultiTenantUpgrade(r registry.Registry) { Name: "multitenant-upgrade", Timeout: 1 * time.Hour, Cluster: r.MakeClusterSpec(2), + Leases: registry.MetamorphicLeases, Owner: registry.OwnerMultiTenant, NonReleaseBlocker: false, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/mvcc_gc.go b/pkg/cmd/roachtest/tests/mvcc_gc.go index d05e661d0e79..326c18dfb380 100644 --- a/pkg/cmd/roachtest/tests/mvcc_gc.go +++ b/pkg/cmd/roachtest/tests/mvcc_gc.go @@ -42,6 +42,7 @@ func registerMVCCGC(r registry.Registry) { Owner: registry.OwnerKV, Timeout: 30 * time.Minute, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, Run: runMVCCGC, }) } diff --git a/pkg/cmd/roachtest/tests/network.go b/pkg/cmd/roachtest/tests/network.go index acd6f801902c..b5fa17f6fc94 100644 --- a/pkg/cmd/roachtest/tests/network.go +++ b/pkg/cmd/roachtest/tests/network.go @@ -301,6 +301,7 @@ func registerNetwork(r registry.Registry) { Name: fmt.Sprintf("network/authentication/nodes=%d", numNodes), Owner: registry.OwnerKV, // Should be moved to new security team once one exists. Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runNetworkAuthentication(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/nodejs_postgres.go b/pkg/cmd/roachtest/tests/nodejs_postgres.go index 5dcc8d1307b5..eb19b7f5e9d6 100644 --- a/pkg/cmd/roachtest/tests/nodejs_postgres.go +++ b/pkg/cmd/roachtest/tests/nodejs_postgres.go @@ -170,6 +170,7 @@ PGSSLCERT=$HOME/certs/client.%s.crt PGSSLKEY=$HOME/certs/client.%s.key PGSSLROOT Name: "node-postgres", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `driver`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runNodeJSPostgres(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/npgsql.go b/pkg/cmd/roachtest/tests/npgsql.go index 5efe39304b64..bec4edef6e17 100644 --- a/pkg/cmd/roachtest/tests/npgsql.go +++ b/pkg/cmd/roachtest/tests/npgsql.go @@ -169,6 +169,7 @@ echo '%s' | git apply --ignore-whitespace -`, npgsqlPatch), Name: "npgsql", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `driver`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runNpgsql(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/pebble_write_throughput.go b/pkg/cmd/roachtest/tests/pebble_write_throughput.go index 7c81ba9a8b19..b0947e67b917 100644 --- a/pkg/cmd/roachtest/tests/pebble_write_throughput.go +++ b/pkg/cmd/roachtest/tests/pebble_write_throughput.go @@ -36,6 +36,7 @@ func registerPebbleWriteThroughput(r registry.Registry) { Owner: registry.OwnerStorage, Timeout: 10 * time.Hour, Cluster: r.MakeClusterSpec(5, spec.CPU(16), spec.SSD(16), spec.RAID0(true)), + Leases: registry.MetamorphicLeases, Tags: registry.Tags("pebble_nightly_write"), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runPebbleWriteBenchmark(ctx, t, c, size, pebble) diff --git a/pkg/cmd/roachtest/tests/pebble_ycsb.go b/pkg/cmd/roachtest/tests/pebble_ycsb.go index b7330dfcd5f4..4ce9a849ef29 100644 --- a/pkg/cmd/roachtest/tests/pebble_ycsb.go +++ b/pkg/cmd/roachtest/tests/pebble_ycsb.go @@ -69,6 +69,7 @@ func registerPebbleYCSB(r registry.Registry) { Owner: registry.OwnerStorage, Timeout: 12 * time.Hour, Cluster: r.MakeClusterSpec(5, spec.CPU(16)), + Leases: registry.MetamorphicLeases, Tags: registry.Tags("pebble_nightly_ycsb_race"), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runPebbleYCSB(ctx, t, c, 64, pebble, 30, []string{"A"}, false /* artifacts */) diff --git a/pkg/cmd/roachtest/tests/pgjdbc.go b/pkg/cmd/roachtest/tests/pgjdbc.go index 93acc59373da..561871ec4b3a 100644 --- a/pkg/cmd/roachtest/tests/pgjdbc.go +++ b/pkg/cmd/roachtest/tests/pgjdbc.go @@ -213,6 +213,7 @@ func registerPgjdbc(r registry.Registry) { Name: "pgjdbc", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `driver`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runPgjdbc(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/pgx.go b/pkg/cmd/roachtest/tests/pgx.go index cd7c96e8fa0d..d079c448d7b9 100644 --- a/pkg/cmd/roachtest/tests/pgx.go +++ b/pkg/cmd/roachtest/tests/pgx.go @@ -134,6 +134,7 @@ func registerPgx(r registry.Registry) { Name: "pgx", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `driver`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runPgx(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/pop.go b/pkg/cmd/roachtest/tests/pop.go index 875cfc802900..1d97f4b66de8 100644 --- a/pkg/cmd/roachtest/tests/pop.go +++ b/pkg/cmd/roachtest/tests/pop.go @@ -102,6 +102,7 @@ func registerPop(r registry.Registry) { Name: "pop", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: runPop, }) diff --git a/pkg/cmd/roachtest/tests/process_lock.go b/pkg/cmd/roachtest/tests/process_lock.go index a23891785acc..d62188e2e443 100644 --- a/pkg/cmd/roachtest/tests/process_lock.go +++ b/pkg/cmd/roachtest/tests/process_lock.go @@ -39,6 +39,7 @@ func registerProcessLock(r registry.Registry) { // encryption-at-rest to ensure we don't corrupt the encryption-at-rest // data during a concurrent process start. EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Timeout: 2 * runDuration, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { startOpts := option.DefaultStartOpts() diff --git a/pkg/cmd/roachtest/tests/psycopg.go b/pkg/cmd/roachtest/tests/psycopg.go index ac8c1ac5e2ce..244ae8c3822d 100644 --- a/pkg/cmd/roachtest/tests/psycopg.go +++ b/pkg/cmd/roachtest/tests/psycopg.go @@ -143,6 +143,7 @@ func registerPsycopg(r registry.Registry) { Name: "psycopg", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `driver`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runPsycopg(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/queue.go b/pkg/cmd/roachtest/tests/queue.go index d7e25f9a4a34..c4f3631e6caf 100644 --- a/pkg/cmd/roachtest/tests/queue.go +++ b/pkg/cmd/roachtest/tests/queue.go @@ -32,6 +32,7 @@ func registerQueue(r registry.Registry) { Name: fmt.Sprintf("queue/nodes=%d", numNodes-1), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runQueue(ctx, t, c) }, diff --git a/pkg/cmd/roachtest/tests/quit.go b/pkg/cmd/roachtest/tests/quit.go index 349ef15f7bab..392cd7341ee2 100644 --- a/pkg/cmd/roachtest/tests/quit.go +++ b/pkg/cmd/roachtest/tests/quit.go @@ -363,6 +363,7 @@ func registerQuitTransfersLeases(r registry.Registry) { Name: fmt.Sprintf("transfer-leases/%s", name), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runQuitTransfersLeases(ctx, t, c, name, method) }, diff --git a/pkg/cmd/roachtest/tests/rebalance_load.go b/pkg/cmd/roachtest/tests/rebalance_load.go index 0595f1252d1d..d39346eb774a 100644 --- a/pkg/cmd/roachtest/tests/rebalance_load.go +++ b/pkg/cmd/roachtest/tests/rebalance_load.go @@ -191,6 +191,7 @@ func registerRebalanceLoad(r registry.Registry) { Name: `rebalance/by-load/leases`, Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(4), // the last node is just used to generate load + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() && runtime.GOARCH == "arm64" { t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/89268") @@ -208,6 +209,7 @@ func registerRebalanceLoad(r registry.Registry) { Name: `rebalance/by-load/leases/mixed-version`, Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(4), // the last node is just used to generate load + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { concurrency = 32 @@ -222,6 +224,7 @@ func registerRebalanceLoad(r registry.Registry) { Name: `rebalance/by-load/replicas`, Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(7), // the last node is just used to generate load + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { concurrency = 32 @@ -238,6 +241,7 @@ func registerRebalanceLoad(r registry.Registry) { Name: `rebalance/by-load/replicas/mixed-version`, Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(7), // the last node is just used to generate load + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { concurrency = 32 @@ -260,6 +264,7 @@ func registerRebalanceLoad(r registry.Registry) { Name: `rebalance/by-load/replicas/ssds=2`, Owner: registry.OwnerKV, Cluster: cSpec, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() { t.Fatal("cannot run multi-store in local mode") diff --git a/pkg/cmd/roachtest/tests/replicagc.go b/pkg/cmd/roachtest/tests/replicagc.go index d8ea3cc38baa..dfd5c4807023 100644 --- a/pkg/cmd/roachtest/tests/replicagc.go +++ b/pkg/cmd/roachtest/tests/replicagc.go @@ -33,6 +33,7 @@ func registerReplicaGC(r registry.Registry) { Name: fmt.Sprintf("replicagc-changed-peers/restart=%t", restart), Owner: registry.OwnerReplication, Cluster: r.MakeClusterSpec(6), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runReplicaGCChangedPeers(ctx, t, c, restart) }, diff --git a/pkg/cmd/roachtest/tests/restart.go b/pkg/cmd/roachtest/tests/restart.go index cd13394f1852..58428468c8a9 100644 --- a/pkg/cmd/roachtest/tests/restart.go +++ b/pkg/cmd/roachtest/tests/restart.go @@ -94,6 +94,7 @@ func registerRestart(r registry.Registry) { Name: "restart/down-for-2m", Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, // "cockroach workload is only in 19.1+" Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runRestart(ctx, t, c, 2*time.Minute) diff --git a/pkg/cmd/roachtest/tests/restore.go b/pkg/cmd/roachtest/tests/restore.go index d7445ad72fa5..b7b56384a44d 100644 --- a/pkg/cmd/roachtest/tests/restore.go +++ b/pkg/cmd/roachtest/tests/restore.go @@ -66,6 +66,7 @@ func registerRestoreNodeShutdown(r registry.Registry) { Name: "restore/nodeShutdown/worker", Owner: registry.OwnerDisasterRecovery, Cluster: sp.hardware.makeClusterSpecs(r, sp.backup.cloud), + Leases: registry.MetamorphicLeases, Timeout: sp.timeout, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { gatewayNode := 2 @@ -83,6 +84,7 @@ func registerRestoreNodeShutdown(r registry.Registry) { Name: "restore/nodeShutdown/coordinator", Owner: registry.OwnerDisasterRecovery, Cluster: sp.hardware.makeClusterSpecs(r, sp.backup.cloud), + Leases: registry.MetamorphicLeases, Timeout: sp.timeout, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/roachmart.go b/pkg/cmd/roachtest/tests/roachmart.go index e2a22f5b2502..1f1d5d872d04 100644 --- a/pkg/cmd/roachtest/tests/roachmart.go +++ b/pkg/cmd/roachtest/tests/roachmart.go @@ -75,6 +75,7 @@ func registerRoachmart(r registry.Registry) { Name: fmt.Sprintf("roachmart/partition=%v", v), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(9, spec.Geo(), spec.Zones("us-central1-b,us-west1-b,europe-west2-b")), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runRoachmart(ctx, t, c, v) }, diff --git a/pkg/cmd/roachtest/tests/ruby_pg.go b/pkg/cmd/roachtest/tests/ruby_pg.go index 22f14085e08a..f66a0652fa4c 100644 --- a/pkg/cmd/roachtest/tests/ruby_pg.go +++ b/pkg/cmd/roachtest/tests/ruby_pg.go @@ -232,6 +232,7 @@ func registerRubyPG(r registry.Registry) { Timeout: 1 * time.Hour, Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/rust_postgres.go b/pkg/cmd/roachtest/tests/rust_postgres.go index 83da5fb94730..7391cdd43963 100644 --- a/pkg/cmd/roachtest/tests/rust_postgres.go +++ b/pkg/cmd/roachtest/tests/rust_postgres.go @@ -168,6 +168,7 @@ func registerRustPostgres(r registry.Registry) { Name: "rust-postgres", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1, spec.CPU(16)), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runRustPostgres(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/schemachange.go b/pkg/cmd/roachtest/tests/schemachange.go index 6e775c6a836f..cd853e43d237 100644 --- a/pkg/cmd/roachtest/tests/schemachange.go +++ b/pkg/cmd/roachtest/tests/schemachange.go @@ -32,6 +32,7 @@ func registerSchemaChangeDuringKV(r registry.Registry) { Name: `schemachange/during/kv`, Owner: registry.OwnerSQLSchema, Cluster: r.MakeClusterSpec(5), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { const fixturePath = `gs://cockroach-fixtures/workload/tpch/scalefactor=10/backup?AUTH=implicit` @@ -309,6 +310,7 @@ func makeIndexAddTpccTest( Name: fmt.Sprintf("schemachange/index/tpcc/w=%d", warehouses), Owner: registry.OwnerSQLSchema, Cluster: spec, + Leases: registry.MetamorphicLeases, Timeout: length * 3, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCC(ctx, t, c, tpccOptions{ @@ -341,6 +343,7 @@ func makeSchemaChangeBulkIngestTest( Name: "schemachange/bulkingest", Owner: registry.OwnerSQLSchema, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Timeout: length * 2, // `fixtures import` (with the workload paths) is not supported in 2.1 Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { @@ -427,6 +430,7 @@ func makeSchemaChangeDuringTPCC( Name: "schemachange/during/tpcc", Owner: registry.OwnerSQLSchema, Cluster: spec, + Leases: registry.MetamorphicLeases, Timeout: length * 3, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCC(ctx, t, c, tpccOptions{ diff --git a/pkg/cmd/roachtest/tests/schemachange_random_load.go b/pkg/cmd/roachtest/tests/schemachange_random_load.go index 600446dcdc11..6cbbf629045a 100644 --- a/pkg/cmd/roachtest/tests/schemachange_random_load.go +++ b/pkg/cmd/roachtest/tests/schemachange_random_load.go @@ -50,6 +50,7 @@ func registerSchemaChangeRandomLoad(r registry.Registry) { spec.Geo(), spec.Zones(geoZonesStr), ), + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { maxOps := 5000 diff --git a/pkg/cmd/roachtest/tests/scrub.go b/pkg/cmd/roachtest/tests/scrub.go index 8def4d759283..23d5c72ea6aa 100644 --- a/pkg/cmd/roachtest/tests/scrub.go +++ b/pkg/cmd/roachtest/tests/scrub.go @@ -57,6 +57,7 @@ func makeScrubTPCCTest( Name: fmt.Sprintf("scrub/%s/tpcc/w=%d", optionName, warehouses), Owner: registry.OwnerSQLQueries, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCC(ctx, t, c, tpccOptions{ Warehouses: warehouses, diff --git a/pkg/cmd/roachtest/tests/secondary_indexes.go b/pkg/cmd/roachtest/tests/secondary_indexes.go index c43548535bb3..46426458e83d 100644 --- a/pkg/cmd/roachtest/tests/secondary_indexes.go +++ b/pkg/cmd/roachtest/tests/secondary_indexes.go @@ -139,6 +139,7 @@ func registerSecondaryIndexesMultiVersionCluster(r registry.Registry) { Name: "schemachange/secondary-index-multi-version", Owner: registry.OwnerSQLSchema, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() && runtime.GOARCH == "arm64" { t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/89268") diff --git a/pkg/cmd/roachtest/tests/sequelize.go b/pkg/cmd/roachtest/tests/sequelize.go index e0af5557fe3c..d79d197241e0 100644 --- a/pkg/cmd/roachtest/tests/sequelize.go +++ b/pkg/cmd/roachtest/tests/sequelize.go @@ -153,6 +153,7 @@ func registerSequelize(r registry.Registry) { Name: "sequelize", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { diff --git a/pkg/cmd/roachtest/tests/slow_drain.go b/pkg/cmd/roachtest/tests/slow_drain.go index 06fbbeaa1163..902ae9f6370b 100644 --- a/pkg/cmd/roachtest/tests/slow_drain.go +++ b/pkg/cmd/roachtest/tests/slow_drain.go @@ -36,6 +36,7 @@ func registerSlowDrain(r registry.Registry) { Name: fmt.Sprintf("slow-drain/duration=%s", duration), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runSlowDrain(ctx, t, c, duration) }, diff --git a/pkg/cmd/roachtest/tests/smoketest_secure.go b/pkg/cmd/roachtest/tests/smoketest_secure.go index deba2d4c3b0a..c155112fc481 100644 --- a/pkg/cmd/roachtest/tests/smoketest_secure.go +++ b/pkg/cmd/roachtest/tests/smoketest_secure.go @@ -31,6 +31,7 @@ func registerSecure(r registry.Registry) { Tags: registry.Tags("smoketest", "weekly"), Owner: registry.OwnerTestEng, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { c.Put(ctx, t.Cockroach(), "./cockroach") settings := install.MakeClusterSettings(install.SecureOption(true)) @@ -46,6 +47,7 @@ func registerSecure(r registry.Registry) { Name: "smoketest/secure/multitenant", Owner: registry.OwnerMultiTenant, Cluster: r.MakeClusterSpec(2), + Leases: registry.MetamorphicLeases, Run: multitenantSmokeTest, }) } diff --git a/pkg/cmd/roachtest/tests/split.go b/pkg/cmd/roachtest/tests/split.go index e360af2dc25a..7fd0d868632e 100644 --- a/pkg/cmd/roachtest/tests/split.go +++ b/pkg/cmd/roachtest/tests/split.go @@ -151,6 +151,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/uniform/nodes=%d", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { // This number was determined experimentally. Often, but not always, // more splits will happen. @@ -196,6 +197,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/uniform/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -215,6 +217,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/sequential/nodes=%d", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -236,6 +239,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/sequential/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -260,6 +264,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/spanning/nodes=%d", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -278,6 +283,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/spanning/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -305,6 +311,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/ycsb/a/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -327,6 +334,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/ycsb/b/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -348,6 +356,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/ycsb/d/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -370,6 +379,7 @@ func registerLoadSplits(r registry.Registry) { Name: fmt.Sprintf("splits/load/ycsb/e/nodes=%d/obj=cpu", numRoachNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLoadSplits(ctx, t, c, splitParams{ maxSize: 10 << 30, // 10 GB @@ -502,6 +512,7 @@ func registerLargeRange(r registry.Registry) { Name: fmt.Sprintf("splits/largerange/size=%s,nodes=%d", bytesStr(size), numNodes), Owner: registry.OwnerKV, Cluster: r.MakeClusterSpec(numNodes), + Leases: registry.MetamorphicLeases, Timeout: 5 * time.Hour, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runLargeRangeSplits(ctx, t, c, size) diff --git a/pkg/cmd/roachtest/tests/sqlalchemy.go b/pkg/cmd/roachtest/tests/sqlalchemy.go index ebac69566444..66c78f42ab69 100644 --- a/pkg/cmd/roachtest/tests/sqlalchemy.go +++ b/pkg/cmd/roachtest/tests/sqlalchemy.go @@ -39,6 +39,7 @@ func registerSQLAlchemy(r registry.Registry) { Name: "sqlalchemy", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runSQLAlchemy(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/sqlsmith.go b/pkg/cmd/roachtest/tests/sqlsmith.go index 91e9edbe1e6a..85f9cdbe4dab 100644 --- a/pkg/cmd/roachtest/tests/sqlsmith.go +++ b/pkg/cmd/roachtest/tests/sqlsmith.go @@ -298,6 +298,7 @@ WITH into_db = 'defaultdb', unsafe_restore_incompatible_version; Name: fmt.Sprintf("sqlsmith/setup=%s/setting=%s", setup, setting), Owner: registry.OwnerSQLQueries, Cluster: clusterSpec, + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Timeout: time.Minute * 20, RequiresLicense: true, diff --git a/pkg/cmd/roachtest/tests/sstable_corruption.go b/pkg/cmd/roachtest/tests/sstable_corruption.go index c540d1cd80e7..79d47b719982 100644 --- a/pkg/cmd/roachtest/tests/sstable_corruption.go +++ b/pkg/cmd/roachtest/tests/sstable_corruption.go @@ -182,6 +182,7 @@ func registerSSTableCorruption(r registry.Registry) { Name: "sstable-corruption/table", Owner: registry.OwnerStorage, Cluster: r.MakeClusterSpec(3), + Leases: registry.MetamorphicLeases, Timeout: 2 * time.Hour, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runSSTableCorruption(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/synctest.go b/pkg/cmd/roachtest/tests/synctest.go index aea006bb2380..8f79ef2f3275 100644 --- a/pkg/cmd/roachtest/tests/synctest.go +++ b/pkg/cmd/roachtest/tests/synctest.go @@ -37,6 +37,7 @@ fi Owner: registry.OwnerStorage, // This test sets up a custom file system; we don't want the cluster reused. Cluster: r.MakeClusterSpec(1, spec.ReuseNone()), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { n := c.Node(1) tmpDir, err := os.MkdirTemp("", "synctest") diff --git a/pkg/cmd/roachtest/tests/tlp.go b/pkg/cmd/roachtest/tests/tlp.go index 5f3ec92fe96a..713829f91360 100644 --- a/pkg/cmd/roachtest/tests/tlp.go +++ b/pkg/cmd/roachtest/tests/tlp.go @@ -42,6 +42,7 @@ func registerTLP(r registry.Registry) { RequiresLicense: true, Tags: nil, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, NativeLibs: registry.LibGEOS, Run: runTLP, }) diff --git a/pkg/cmd/roachtest/tests/tpcc.go b/pkg/cmd/roachtest/tests/tpcc.go index 893cd7b72d04..214a7f93c399 100644 --- a/pkg/cmd/roachtest/tests/tpcc.go +++ b/pkg/cmd/roachtest/tests/tpcc.go @@ -494,6 +494,7 @@ func registerTPCC(r registry.Registry) { Tags: registry.Tags(`default`, `release_qualification`, `aws`), Cluster: headroomSpec, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { maxWarehouses := maxSupportedTPCCWarehouses(*t.BuildVersion(), cloud, t.Spec().(*registry.TestSpec).Cluster) headroomWarehouses := int(float64(maxWarehouses) * 0.7) @@ -520,6 +521,7 @@ func registerTPCC(r registry.Registry) { Tags: registry.Tags(`default`), Cluster: mixedHeadroomSpec, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCCMixedHeadroom(ctx, t, c, cloud, 1) }, @@ -532,6 +534,7 @@ func registerTPCC(r registry.Registry) { Tags: registry.Tags(`default`), Cluster: mixedHeadroomSpec, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCCMixedHeadroom(ctx, t, c, cloud, 2) }, @@ -541,6 +544,7 @@ func registerTPCC(r registry.Registry) { Owner: registry.OwnerTestEng, Cluster: r.MakeClusterSpec(4, spec.CPU(16)), EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTPCC(ctx, t, c, tpccOptions{ Warehouses: 1, @@ -559,6 +563,7 @@ func registerTPCC(r registry.Registry) { // slowly ramp up the load. Timeout: 4*24*time.Hour + 10*time.Hour, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { warehouses := 1000 runTPCC(ctx, t, c, tpccOptions{ @@ -677,6 +682,7 @@ func registerTPCC(r registry.Registry) { // Add an extra node which serves as the workload nodes. Cluster: r.MakeClusterSpec(len(regions)*nodesPerRegion+1, spec.Geo(), spec.Zones(strings.Join(zs, ","))), EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { t.Status(tc.desc) duration := 90 * time.Minute @@ -768,6 +774,7 @@ func registerTPCC(r registry.Registry) { Owner: registry.OwnerTestEng, Cluster: r.MakeClusterSpec(4), EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { duration := 30 * time.Minute runTPCC(ctx, t, c, tpccOptions{ @@ -797,6 +804,7 @@ func registerTPCC(r registry.Registry) { Cluster: r.MakeClusterSpec(4, spec.CPU(16)), Timeout: 6 * time.Hour, EncryptionSupport: registry.EncryptionMetamorphic, + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { skip.WithIssue(t, 53886) runTPCC(ctx, t, c, tpccOptions{ diff --git a/pkg/cmd/roachtest/tests/typeorm.go b/pkg/cmd/roachtest/tests/typeorm.go index 0e06164626e7..93ec33d79ae7 100644 --- a/pkg/cmd/roachtest/tests/typeorm.go +++ b/pkg/cmd/roachtest/tests/typeorm.go @@ -182,6 +182,7 @@ func registerTypeORM(r registry.Registry) { Name: "typeorm", Owner: registry.OwnerSQLSessions, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Tags: registry.Tags(`default`, `orm`), Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { runTypeORM(ctx, t, c) diff --git a/pkg/cmd/roachtest/tests/validate_system_schema_after_version_upgrade.go b/pkg/cmd/roachtest/tests/validate_system_schema_after_version_upgrade.go index 4ca669bb1172..5c0486122e7b 100644 --- a/pkg/cmd/roachtest/tests/validate_system_schema_after_version_upgrade.go +++ b/pkg/cmd/roachtest/tests/validate_system_schema_after_version_upgrade.go @@ -35,6 +35,7 @@ func registerValidateSystemSchemaAfterVersionUpgrade(r registry.Registry) { Name: "systemschema/validate-after-version-upgrade", Owner: registry.OwnerSQLSchema, Cluster: r.MakeClusterSpec(1), + Leases: registry.MetamorphicLeases, Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { if c.IsLocal() && runtime.GOARCH == "arm64" { t.Skip("Skip under ARM64. See https://github.com/cockroachdb/cockroach/issues/89268")