diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index 1781b53e66b4..e910fcaf7ae0 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -264,6 +264,7 @@
sql.txn.read_committed_isolation.enabled
booleanfalseset to true to allow transactions to use the READ COMMITTED isolation level if specified by BEGIN/SET commandsServerless/Dedicated/Self-Hosted
sql.txn_fingerprint_id_cache.capacity
integer100the maximum number of txn fingerprint IDs storedServerless/Dedicated/Self-Hosted
storage.experimental.eventually_file_only_snapshots.enabled
booleanfalseset to true to use eventually-file-only-snapshots even when kv.snapshot_receiver.excise.enabled is falseDedicated/Self-Hosted +
storage.ingest_split.enabled
booleanfalseset to true to use ingest-time splitting to lower write-amplification (experimental)Dedicated/Self-Hosted
storage.max_sync_duration
duration20smaximum duration for disk operations; any operations that take longer than this setting trigger a warning log entry or process crashServerless/Dedicated/Self-Hosted (read-only)
storage.max_sync_duration.fatal.enabled
booleantrueif true, fatal the process when a disk operation exceeds storage.max_sync_durationServerless/Dedicated/Self-Hosted
storage.value_blocks.enabled
booleantrueset to true to enable writing of value blocks in sstablesServerless/Dedicated/Self-Hosted diff --git a/pkg/storage/pebble.go b/pkg/storage/pebble.go index dbe4a3fd4d24..c25682630b15 100644 --- a/pkg/storage/pebble.go +++ b/pkg/storage/pebble.go @@ -135,6 +135,21 @@ var UseExciseForSnapshots = settings.RegisterBoolSetting( settings.WithPublic, ) +// IngestSplitEnabled controls whether ingest-time splitting is enabled in +// Pebble. This feature allows for existing sstables to be split into multiple +// virtual sstables at ingest time if that allows for an ingestion sstable to go +// into a lower level than it would otherwise be in. No keys are masked with +// this split; it only happens if there are no keys in that existing sstable +// in the span of the incoming sstable. +var IngestSplitEnabled = settings.RegisterBoolSetting( + settings.SystemOnly, + "storage.ingest_split.enabled", + "set to true to use ingest-time splitting to lower write-amplification (experimental)", + util.ConstantWithMetamorphicTestBool( + "storage.ingest_split.enabled", false), /* defaultValue */ + settings.WithPublic, +) + // IngestAsFlushable controls whether ingested sstables that overlap the // memtable may be lazily ingested: written to the WAL and enqueued in the list // of flushables (eg, memtables, large batches and now lazily-ingested @@ -1094,6 +1109,9 @@ func NewPebble(ctx context.Context, cfg PebbleConfig) (p *Pebble, err error) { // See https://github.com/cockroachdb/pebble/issues/3120 // TODO(travers): Re-enable, once the issues are resolved. opts.Experimental.MultiLevelCompactionHeuristic = pebble.NoMultiLevel{} + opts.Experimental.IngestSplit = func() bool { + return IngestSplitEnabled.Get(&cfg.Settings.SV) + } auxDir := opts.FS.PathJoin(cfg.Dir, base.AuxiliaryDir) if err := opts.FS.MkdirAll(auxDir, 0755); err != nil {