Skip to content

Commit 703334c

Browse files
committed
storage: remove 'storage.columnar_blocks.enabled' setting
Remove the 'storage.columnar_blocks.enabled' cluster setting, requiring that columnar blocks always be enabled. All recent sstable formats use columnar blocks. Eventually we'd like to remove support for row-block formats altogether once we have a guarantee that rowblk blocks no longer exist anywhere. This commit changes Pebble's behavior to treat columnar blocks as always enabled. Epic: none Release note (ops change): Removes the 'storage.columnar_blocks.enabled' cluster setting; columnar blocks are always enabled.
1 parent 12469e1 commit 703334c

File tree

9 files changed

+12
-64
lines changed

9 files changed

+12
-64
lines changed

docs/generated/settings/settings-for-tenants.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ sql.txn.read_committed_isolation.enabled boolean true set to true to allow trans
397397
sql.txn.repeatable_read_isolation.enabled (alias: sql.txn.snapshot_isolation.enabled) boolean false set to true to allow transactions to use the REPEATABLE READ isolation level if specified by BEGIN/SET commands application
398398
sql.txn_fingerprint_id_cache.capacity integer 100 the maximum number of txn fingerprint IDs stored application
399399
sql.vecindex.stalled_op.timeout duration 100ms amount of time before other vector index workers will assist with a stalled background fixup application
400-
storage.columnar_blocks.enabled boolean true set to true to enable columnar-blocks to store KVs in a columnar format system-visible
401400
storage.delete_compaction_excise.enabled boolean true set to false to direct Pebble to not partially excise sstables in delete-only compactions system-visible
402401
storage.ingestion.value_blocks.enabled boolean true set to true to enable writing of value blocks in ingestion sstables application
403402
storage.max_sync_duration duration 20s maximum duration for disk operations; any operations that take longer than this setting trigger a warning log entry or process crash system-visible

docs/generated/settings/settings.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@
352352
<tr><td><div id="setting-sql-txn-snapshot-isolation-enabled" class="anchored"><code>sql.txn.repeatable_read_isolation.enabled<br />(alias: sql.txn.snapshot_isolation.enabled)</code></div></td><td>boolean</td><td><code>false</code></td><td>set to true to allow transactions to use the REPEATABLE READ isolation level if specified by BEGIN/SET commands</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
353353
<tr><td><div id="setting-sql-txn-fingerprint-id-cache-capacity" class="anchored"><code>sql.txn_fingerprint_id_cache.capacity</code></div></td><td>integer</td><td><code>100</code></td><td>the maximum number of txn fingerprint IDs stored</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
354354
<tr><td><div id="setting-sql-vecindex-stalled-op-timeout" class="anchored"><code>sql.vecindex.stalled_op.timeout</code></div></td><td>duration</td><td><code>100ms</code></td><td>amount of time before other vector index workers will assist with a stalled background fixup</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
355-
<tr><td><div id="setting-storage-columnar-blocks-enabled" class="anchored"><code>storage.columnar_blocks.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable columnar-blocks to store KVs in a columnar format</td><td>Dedicated/Self-hosted (read-write); Serverless (read-only)</td></tr>
356355
<tr><td><div id="setting-storage-delete-compaction-excise-enabled" class="anchored"><code>storage.delete_compaction_excise.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to false to direct Pebble to not partially excise sstables in delete-only compactions</td><td>Dedicated/Self-hosted (read-write); Serverless (read-only)</td></tr>
357356
<tr><td><div id="setting-storage-ingest-split-enabled" class="anchored"><code>storage.ingest_split.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to false to disable ingest-time splitting that lowers write-amplification</td><td>Dedicated/Self-Hosted</td></tr>
358357
<tr><td><div id="setting-storage-ingestion-value-blocks-enabled" class="anchored"><code>storage.ingestion.value_blocks.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable writing of value blocks in ingestion sstables</td><td>Serverless/Dedicated/Self-Hosted</td></tr>

pkg/cmd/roachtest/tests/tpcc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,6 @@ func runTPCCPublished(
24532453
_, _ = db.ExecContext(ctx, `SET CLUSTER SETTING admission.kv.enabled = false`)
24542454
_, _ = db.ExecContext(ctx, `SET CLUSTER SETTING kv.replication_reports.interval = '0s'`)
24552455
_, _ = db.ExecContext(ctx, `ALTER RANGE default CONFIGURE ZONE USING gc.ttlseconds = 600`)
2456-
_, _ = db.ExecContext(ctx, `SET CLUSTER SETTING storage.columnar_blocks.enabled = false;`)
24572456

24582457
}
24592458
require.NoError(t, db.Close())

pkg/kv/kvserver/kvstorage/snaprecv/sst_snapshot_storage_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ func testMultiSSTWriterInitSSTInner(t *testing.T, interesting bool) {
295295

296296
st := cluster.MakeTestingClusterSettings()
297297

298-
// Disabling columnar blocks causes stats changes.
299-
storage.ColumnarBlocksEnabled.Override(context.Background(), &st.SV, true)
300298
// The tests rely on specific SST sizes; we cannot use MinLZ as the
301299
// compression can depend on the architecture.
302300
storage.CompressionAlgorithmStorage.Override(context.Background(), &st.SV, storage.StoreCompressionSnappy)

pkg/kv/kvserver/rangefeed/event_size_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ func generateStaticTestdata() testData {
9696
func TestEventSizeCalculation(t *testing.T) {
9797
st := cluster.MakeTestingClusterSettings()
9898
data := generateStaticTestdata()
99-
storage.ColumnarBlocksEnabled.Override(context.Background(), &st.SV, true)
10099
storage.CompressionAlgorithmStorage.Override(context.Background(), &st.SV, storage.StoreCompressionSnappy)
101100

102101
key := data.key

pkg/settings/registry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ var retiredSettings = map[InternalKey]struct{}{
271271
// removed as of 25.3
272272
"sql.metrics.max_stmt_fingerprints_per_explicit_txn": {},
273273
"sql.jobs.legacy_per_job_access_via_details.enabled": {},
274+
275+
// removed as of 25.4
276+
"storage.columnar_blocks.enabled": {},
274277
}
275278

276279
// grandfatheredDefaultSettings is the list of "grandfathered" existing sql.defaults

pkg/storage/pebble.go

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,6 @@ var IngestSplitEnabled = settings.RegisterBoolSetting(
7474
settings.WithPublic,
7575
)
7676

77-
// ColumnarBlocksEnabled controls whether columnar-blocks are enabled in Pebble.
78-
var ColumnarBlocksEnabled = settings.RegisterBoolSetting(
79-
settings.SystemVisible,
80-
"storage.columnar_blocks.enabled",
81-
"set to true to enable columnar-blocks to store KVs in a columnar format",
82-
metamorphic.ConstantWithTestBool(
83-
"storage.columnar_blocks.enabled", true /* defaultValue */),
84-
settings.WithPublic,
85-
)
86-
8777
// deleteCompactionsCanExcise controls whether delete compactions can
8878
// apply rangedels/rangekeydels on sstables they partially apply to, through
8979
// an excise operation, instead of just applying the rangedels/rangekeydels
@@ -423,8 +413,7 @@ var (
423413
valueSeparationEnabled = settings.RegisterBoolSetting(
424414
settings.SystemVisible,
425415
"storage.value_separation.enabled",
426-
"whether or not values may be separated into blob files; "+
427-
"requires columnar blocks to be enabled",
416+
"whether or not values may be separated into blob files",
428417
metamorphic.ConstantWithTestBool(
429418
"storage.value_separation.enabled", true /* defaultValue */),
430419
)
@@ -917,9 +906,7 @@ func newPebble(ctx context.Context, cfg engineConfig) (p *Pebble, err error) {
917906
cfg.opts.Experimental.IngestSplit = func() bool {
918907
return IngestSplitEnabled.Get(&cfg.settings.SV)
919908
}
920-
cfg.opts.Experimental.EnableColumnarBlocks = func() bool {
921-
return ColumnarBlocksEnabled.Get(&cfg.settings.SV)
922-
}
909+
cfg.opts.Experimental.EnableColumnarBlocks = func() bool { return true }
923910
cfg.opts.Experimental.EnableDeleteOnlyCompactionExcises = func() bool {
924911
return deleteCompactionsCanExcise.Get(&cfg.settings.SV)
925912
}

pkg/storage/sst_writer.go

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,9 @@ func (*noopFinishAbort) Abort() {}
8282
// also used when constructing sstables for backups (because these sstables may
8383
// ultimately be ingested during online restore).
8484
func MakeIngestionWriterOptions(ctx context.Context, cs *cluster.Settings) sstable.WriterOptions {
85-
// All supported versions understand TableFormatPebblev4. If columnar blocks
86-
// are enabled and the active cluster version is at least 24.3, use
87-
// TableFormatPebblev5.
88-
format := sstable.TableFormatPebblev4
89-
if ColumnarBlocksEnabled.Get(&cs.SV) {
90-
format = sstable.TableFormatPebblev5
91-
}
85+
// TODO(jackson): Tie the table format to the cluster version using
86+
// FormatMajorVersion.MaxTableFormat.
87+
format := sstable.TableFormatPebblev5
9288

9389
opts := DefaultPebbleOptions().MakeWriterOptions(0, format)
9490
// By default, compress with the algorithm used for L6 in a Pebble store.
@@ -123,13 +119,9 @@ func makeSSTRewriteOptions(
123119
// scanned and their keys inserted into new sstables (NB: constructed using
124120
// MakeIngestionSSTWriter) that ultimately are uploaded to object storage.
125121
func MakeTransportSSTWriter(ctx context.Context, cs *cluster.Settings, f io.Writer) SSTWriter {
126-
// By default, take a conservative approach and assume we don't have newer
127-
// table features available. Upgrade to an appropriate version only if the
128-
// cluster supports it.
129-
format := sstable.TableFormatPebblev4
130-
if ColumnarBlocksEnabled.Get(&cs.SV) {
131-
format = sstable.TableFormatPebblev5
132-
}
122+
// TODO(jackson): Tie the table format to the cluster version using
123+
// FormatMajorVersion.MaxTableFormat.
124+
format := sstable.TableFormatPebblev5
133125

134126
opts := DefaultPebbleOptions().MakeWriterOptions(0, format)
135127

pkg/storage/sst_writer_test.go

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ func TestMakeIngestionWriterOptions(t *testing.T) {
8787
st: func() *cluster.Settings {
8888
st := cluster.MakeTestingClusterSettings()
8989
IngestionValueBlocksEnabled.Override(context.Background(), &st.SV, true)
90-
ColumnarBlocksEnabled.Override(context.Background(), &st.SV, false)
9190
return st
9291
}(),
9392
want: want{
94-
format: sstable.TableFormatPebblev4,
93+
format: sstable.TableFormatPebblev5,
9594
disableValueBlocks: false,
9695
},
9796
},
@@ -100,40 +99,13 @@ func TestMakeIngestionWriterOptions(t *testing.T) {
10099
st: func() *cluster.Settings {
101100
st := cluster.MakeTestingClusterSettings()
102101
IngestionValueBlocksEnabled.Override(context.Background(), &st.SV, false)
103-
ColumnarBlocksEnabled.Override(context.Background(), &st.SV, false)
104-
return st
105-
}(),
106-
want: want{
107-
format: sstable.TableFormatPebblev4,
108-
disableValueBlocks: true,
109-
},
110-
},
111-
{
112-
name: "enable columnar blocks",
113-
st: func() *cluster.Settings {
114-
st := cluster.MakeTestingClusterSettings()
115-
IngestionValueBlocksEnabled.Override(context.Background(), &st.SV, false)
116-
ColumnarBlocksEnabled.Override(context.Background(), &st.SV, true)
117102
return st
118103
}(),
119104
want: want{
120105
format: sstable.TableFormatPebblev5,
121106
disableValueBlocks: true,
122107
},
123108
},
124-
{
125-
name: "enable columnar blocks with value blocks",
126-
st: func() *cluster.Settings {
127-
st := cluster.MakeTestingClusterSettings()
128-
IngestionValueBlocksEnabled.Override(context.Background(), &st.SV, true)
129-
ColumnarBlocksEnabled.Override(context.Background(), &st.SV, true)
130-
return st
131-
}(),
132-
want: want{
133-
format: sstable.TableFormatPebblev5,
134-
disableValueBlocks: false,
135-
},
136-
},
137109
}
138110

139111
for _, tc := range testCases {

0 commit comments

Comments
 (0)