Skip to content

Commit

Permalink
ccl,roachtest: remove uses of storage.mvcc.range_tombstones.enabled
Browse files Browse the repository at this point in the history
Remove uses of the `storage.mvcc.range_tombstones.enabled` cluster setting.
This cluster setting is ignored in cluster version 23.1+.

Epic: none
Informs #97869.
Release note: none
  • Loading branch information
jbowens committed Aug 31, 2023
1 parent bb269f0 commit fe6a83d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 47 deletions.
7 changes: 0 additions & 7 deletions pkg/ccl/backupccl/tenant_backup_nemesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ func TestTenantBackupWithCanceledImport(t *testing.T) {
)
defer hostClusterCleanupFn()

hostSQLDB.Exec(t, "SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true")
hostSQLDB.Exec(t, "ALTER TENANT ALL SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true")

tenant10, err := tc.Servers[0].StartTenant(ctx, base.TestTenantArgs{
TenantID: roachpb.MustMakeTenantID(10),
TestingKnobs: base.TestingKnobs{
Expand Down Expand Up @@ -143,10 +140,6 @@ func TestTenantBackupNemesis(t *testing.T) {
)
defer hostClusterCleanupFn()

// Range tombstones must be enabled for tenant backups to work correctly.
hostSQLDB.Exec(t, "SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true")
hostSQLDB.Exec(t, "ALTER TENANT ALL SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true")

tenant10, err := tc.Servers[0].StartTenant(ctx, base.TestTenantArgs{
TenantID: roachpb.MustMakeTenantID(10),
TestingKnobs: base.TestingKnobs{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# - roll it back it back non-mvcc
# - run an inc backup and ensure we reintroduce the table spans

# disabled to run within tenant as they don't have access to the
# storage.mvcc.range_tombstones.enabled cluster setting
new-cluster name=s1 beforeVersion=23_1_MVCCTombstones disable-tenant
new-cluster name=s1
----

###########
# Case 1: an incremental backup captures a non-mvcc rollback
# set up
###########

exec-sql
Expand All @@ -36,12 +34,6 @@ exec-sql
SET CLUSTER SETTING kv.bulkio.write_metadata_sst.enabled = false;
----


exec-sql
SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = false;
----


exec-sql
EXPORT INTO CSV 'nodelocal://1/export1/' FROM SELECT * FROM baz;
----
Expand Down Expand Up @@ -163,8 +155,8 @@ ORDER BY
----
d foo table 3 full
d foofoo table 4 full
d foo table 0 incremental
d foofoo table 1 incremental
d foo table 3 incremental
d foofoo table 7 incremental

query-sql
SELECT
Expand All @@ -178,8 +170,8 @@ ORDER BY
----
d foo table 3 full
d foofoo table 4 full
d foo table 0 incremental
d foofoo table 1 incremental
d foo table 3 incremental
d foofoo table 7 incremental


query-sql
Expand All @@ -194,8 +186,8 @@ ORDER BY
----
d foo table 3 full
d foofoo table 4 full
d foo table 0 incremental
d foofoo table 1 incremental
d foo table 3 incremental
d foofoo table 7 incremental


# To verify the incremental backed up the pre-import state table, restore d and ensure all tables
Expand Down Expand Up @@ -242,11 +234,6 @@ exec-sql
SET CLUSTER SETTING jobs.debug.pausepoints = 'import.after_ingest';
----


exec-sql
SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true;
----

exec-sql
SET CLUSTER SETTING kv.bulkio.write_metadata_sst.enabled = false;
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ BACKUP INTO 'nodelocal://1/cluster_backup';
new-cluster name=s2 nodes=1 share-io-dir=s1 disable-tenant
----

exec-sql
SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true;
----

# Restore's OnFailOrCancel deletes descriptors which requires us to wait for no
# versions of that descriptor to be leased before proceeding. Since our test fails
# the job after the descriptors have been published, it's possible for them to be leased
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# disabled for tenants as they can't set storage.mvcc.range_tombstones.enabled
new-cluster name=s1 nodes=1 disable-tenant
new-cluster name=s1 nodes=1
----

subtest restore-retry
Expand All @@ -17,11 +16,7 @@ exec-sql
BACKUP INTO 'nodelocal://1/cluster_backup';
----

new-cluster name=s2 nodes=1 share-io-dir=s1 disable-tenant
----

exec-sql
SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true;
new-cluster name=s2 nodes=1 share-io-dir=s1
----

exec-sql
Expand Down
1 change: 0 additions & 1 deletion pkg/ccl/changefeedccl/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,6 @@ func TestChangefeedFailOnTableOffline(t *testing.T) {
cdcTestNamedWithSystem(t, "reverted import fails changefeed with earlier cursor", func(t *testing.T, s TestServerWithSystem, f cdctest.TestFeedFactory) {
sysSQLDB := sqlutils.MakeSQLRunner(s.SystemDB)
sysSQLDB.Exec(t, "SET CLUSTER SETTING kv.bulk_io_write.small_write_size = '1'")
sysSQLDB.Exec(t, "SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = true")

sqlDB := sqlutils.MakeSQLRunner(s.DB)
sqlDB.Exec(t, `CREATE TABLE for_import (a INT PRIMARY KEY, b INT)`)
Expand Down
4 changes: 0 additions & 4 deletions pkg/cmd/roachtest/tests/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,6 @@ func runBackupMVCCRangeTombstones(
t.Status("configuring cluster")
_, err := conn.Exec(`SET CLUSTER SETTING kv.bulk_ingest.max_index_buffer_size = '2gb'`)
require.NoError(t, err)
if config.tenantName == "" {
_, err = conn.Exec(`SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = 't'`)
require.NoError(t, err)
}
_, err = conn.Exec(`SET CLUSTER SETTING server.debug.default_vmodule = 'txn=2,sst_batcher=4,
revert=2'`)
require.NoError(t, err)
Expand Down
3 changes: 0 additions & 3 deletions pkg/cmd/roachtest/tests/mvcc_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ func runMVCCGC(ctx context.Context, t test.Test, c cluster.Cluster) {
execSQLOrFail(fmt.Sprintf(`SET CLUSTER SETTING %s = $1`, name), value)
}

// Explicitly enable range tombstones. Can be removed once ranges tombstones
// are enabled by default.
setClusterSetting("storage.mvcc.range_tombstones.enabled", true)
// Protected timestamps prevent GC from collecting data, even with low ttl
// we need to wait for protected ts to be moved. By reducing this interval
// we ensure that data will always be collectable after ttl + 5s.
Expand Down

0 comments on commit fe6a83d

Please sign in to comment.