Skip to content

Commit

Permalink
*: remove sites setting storage.mvcc.range_tombstones.enabled='t'
Browse files Browse the repository at this point in the history
The storage.mvcc.range_tombstones.enabled cluster setting is ignored on 23.1+
cluster versions. On these cluster version, MVCC range tombstones are used
unconditionally. Remove test uses of this cluster setting that redundantly
set `storage.mvcc.range_tombstones.enabled` to true.

A few remaining tests disable the MVCC range tombstones cluster setting. These
tests will require some additional work to adapt.

Informs cockroachdb#97869.
Epic: none
Release note: none
  • Loading branch information
jbowens committed Aug 24, 2023
1 parent 76270db commit ff57d2d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 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
1 change: 0 additions & 1 deletion pkg/ccl/changefeedccl/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3335,7 +3335,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 ff57d2d

Please sign in to comment.