Skip to content

Commit

Permalink
Merge pull request #6529 from SungJin1212/Deprecate-blocks-storage.ts…
Browse files Browse the repository at this point in the history
…db.wal-compression-enabled

Deprecate -blocks-storage.tsdb.wal-compression-enabled flag
  • Loading branch information
CharlieTLe authored Jan 22, 2025
2 parents 0e3d3cd + c2c16f8 commit 75f10e4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## master / unreleased

* [CHANGE] Deprecate `-blocks-storage.tsdb.wal-compression-enabled` flag (use `blocks-storage.tsdb.wal-compression-type` instead). #6529
* [CHANGE] OTLP: Change OTLP handler to be consistent with the Prometheus OTLP handler. #6272
- `target_info` metric is enabled by default and can be disabled via `-distributor.otlp.disable-target-info=true` flag
- Convert all attributes to labels is disabled by default and can be enabled via `-distributor.otlp.convert-all-attributes=true` flag
Expand Down
5 changes: 0 additions & 5 deletions docs/blocks-storage/querier.md
Original file line number Diff line number Diff line change
Expand Up @@ -1508,11 +1508,6 @@ blocks_storage:
# CLI flag: -blocks-storage.tsdb.stripe-size
[stripe_size: <int> | default = 16384]

# Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to
# enable TSDB WAL compression.
# CLI flag: -blocks-storage.tsdb.wal-compression-enabled
[wal_compression_enabled: <boolean> | default = false]

# TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable
# compression)
# CLI flag: -blocks-storage.tsdb.wal-compression-type
Expand Down
5 changes: 0 additions & 5 deletions docs/blocks-storage/store-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -1612,11 +1612,6 @@ blocks_storage:
# CLI flag: -blocks-storage.tsdb.stripe-size
[stripe_size: <int> | default = 16384]

# Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to
# enable TSDB WAL compression.
# CLI flag: -blocks-storage.tsdb.wal-compression-enabled
[wal_compression_enabled: <boolean> | default = false]

# TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable
# compression)
# CLI flag: -blocks-storage.tsdb.wal-compression-type
Expand Down
5 changes: 0 additions & 5 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2058,11 +2058,6 @@ tsdb:
# CLI flag: -blocks-storage.tsdb.stripe-size
[stripe_size: <int> | default = 16384]

# Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to
# enable TSDB WAL compression.
# CLI flag: -blocks-storage.tsdb.wal-compression-enabled
[wal_compression_enabled: <boolean> | default = false]

# TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable
# compression)
# CLI flag: -blocks-storage.tsdb.wal-compression-type
Expand Down
6 changes: 4 additions & 2 deletions pkg/storage/tsdb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (

"github.com/cortexproject/cortex/pkg/storage/bucket"
"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/flagext"
util_log "github.com/cortexproject/cortex/pkg/util/log"
)

const (
Expand Down Expand Up @@ -141,7 +143,6 @@ type TSDBConfig struct {
HeadCompactionIdleTimeout time.Duration `yaml:"head_compaction_idle_timeout"`
HeadChunksWriteBufferSize int `yaml:"head_chunks_write_buffer_size_bytes"`
StripeSize int `yaml:"stripe_size"`
WALCompressionEnabled bool `yaml:"wal_compression_enabled"`
WALCompressionType string `yaml:"wal_compression_type"`
WALSegmentSizeBytes int `yaml:"wal_segment_size_bytes"`
FlushBlocksOnShutdown bool `yaml:"flush_blocks_on_shutdown"`
Expand Down Expand Up @@ -195,7 +196,6 @@ func (cfg *TSDBConfig) RegisterFlags(f *flag.FlagSet) {
f.DurationVar(&cfg.HeadCompactionIdleTimeout, "blocks-storage.tsdb.head-compaction-idle-timeout", 1*time.Hour, "If TSDB head is idle for this duration, it is compacted. Note that up to 25% jitter is added to the value to avoid ingesters compacting concurrently. 0 means disabled.")
f.IntVar(&cfg.HeadChunksWriteBufferSize, "blocks-storage.tsdb.head-chunks-write-buffer-size-bytes", chunks.DefaultWriteBufferSize, "The write buffer size used by the head chunks mapper. Lower values reduce memory utilisation on clusters with a large number of tenants at the cost of increased disk I/O operations.")
f.IntVar(&cfg.StripeSize, "blocks-storage.tsdb.stripe-size", 16384, "The number of shards of series to use in TSDB (must be a power of 2). Reducing this will decrease memory footprint, but can negatively impact performance.")
f.BoolVar(&cfg.WALCompressionEnabled, "blocks-storage.tsdb.wal-compression-enabled", false, "Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to enable TSDB WAL compression.")
f.StringVar(&cfg.WALCompressionType, "blocks-storage.tsdb.wal-compression-type", "", "TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable compression)")
f.IntVar(&cfg.WALSegmentSizeBytes, "blocks-storage.tsdb.wal-segment-size-bytes", wlog.DefaultSegmentSize, "TSDB WAL segments files max size (bytes).")
f.BoolVar(&cfg.FlushBlocksOnShutdown, "blocks-storage.tsdb.flush-blocks-on-shutdown", false, "True to flush blocks to storage on shutdown. If false, incomplete blocks will be reused after restart.")
Expand All @@ -206,6 +206,8 @@ func (cfg *TSDBConfig) RegisterFlags(f *flag.FlagSet) {
f.Int64Var(&cfg.OutOfOrderCapMax, "blocks-storage.tsdb.out-of-order-cap-max", tsdb.DefaultOutOfOrderCapMax, "[EXPERIMENTAL] Configures the maximum number of samples per chunk that can be out-of-order.")
f.BoolVar(&cfg.EnableNativeHistograms, "blocks-storage.tsdb.enable-native-histograms", false, "[EXPERIMENTAL] True to enable native histogram.")

flagext.DeprecatedFlag(f, "blocks-storage.tsdb.wal-compression-enabled", "Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to enable TSDB WAL compression.", util_log.Logger)

cfg.PostingsCache.RegisterFlagsWithPrefix("blocks-storage.", f)
}

Expand Down

0 comments on commit 75f10e4

Please sign in to comment.