Skip to content

Commit 75f10e4

Browse files
authored
Merge pull request #6529 from SungJin1212/Deprecate-blocks-storage.tsdb.wal-compression-enabled
Deprecate -blocks-storage.tsdb.wal-compression-enabled flag
2 parents 0e3d3cd + c2c16f8 commit 75f10e4

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## master / unreleased
44

5+
* [CHANGE] Deprecate `-blocks-storage.tsdb.wal-compression-enabled` flag (use `blocks-storage.tsdb.wal-compression-type` instead). #6529
56
* [CHANGE] OTLP: Change OTLP handler to be consistent with the Prometheus OTLP handler. #6272
67
- `target_info` metric is enabled by default and can be disabled via `-distributor.otlp.disable-target-info=true` flag
78
- Convert all attributes to labels is disabled by default and can be enabled via `-distributor.otlp.convert-all-attributes=true` flag

docs/blocks-storage/querier.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,11 +1508,6 @@ blocks_storage:
15081508
# CLI flag: -blocks-storage.tsdb.stripe-size
15091509
[stripe_size: <int> | default = 16384]
15101510

1511-
# Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to
1512-
# enable TSDB WAL compression.
1513-
# CLI flag: -blocks-storage.tsdb.wal-compression-enabled
1514-
[wal_compression_enabled: <boolean> | default = false]
1515-
15161511
# TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable
15171512
# compression)
15181513
# CLI flag: -blocks-storage.tsdb.wal-compression-type

docs/blocks-storage/store-gateway.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,11 +1612,6 @@ blocks_storage:
16121612
# CLI flag: -blocks-storage.tsdb.stripe-size
16131613
[stripe_size: <int> | default = 16384]
16141614

1615-
# Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to
1616-
# enable TSDB WAL compression.
1617-
# CLI flag: -blocks-storage.tsdb.wal-compression-enabled
1618-
[wal_compression_enabled: <boolean> | default = false]
1619-
16201615
# TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable
16211616
# compression)
16221617
# CLI flag: -blocks-storage.tsdb.wal-compression-type

docs/configuration/config-file-reference.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,11 +2058,6 @@ tsdb:
20582058
# CLI flag: -blocks-storage.tsdb.stripe-size
20592059
[stripe_size: <int> | default = 16384]
20602060

2061-
# Deprecated (use blocks-storage.tsdb.wal-compression-type instead): True to
2062-
# enable TSDB WAL compression.
2063-
# CLI flag: -blocks-storage.tsdb.wal-compression-enabled
2064-
[wal_compression_enabled: <boolean> | default = false]
2065-
20662061
# TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable
20672062
# compression)
20682063
# CLI flag: -blocks-storage.tsdb.wal-compression-type

pkg/storage/tsdb/config.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616

1717
"github.com/cortexproject/cortex/pkg/storage/bucket"
1818
"github.com/cortexproject/cortex/pkg/util"
19+
"github.com/cortexproject/cortex/pkg/util/flagext"
20+
util_log "github.com/cortexproject/cortex/pkg/util/log"
1921
)
2022

2123
const (
@@ -141,7 +143,6 @@ type TSDBConfig struct {
141143
HeadCompactionIdleTimeout time.Duration `yaml:"head_compaction_idle_timeout"`
142144
HeadChunksWriteBufferSize int `yaml:"head_chunks_write_buffer_size_bytes"`
143145
StripeSize int `yaml:"stripe_size"`
144-
WALCompressionEnabled bool `yaml:"wal_compression_enabled"`
145146
WALCompressionType string `yaml:"wal_compression_type"`
146147
WALSegmentSizeBytes int `yaml:"wal_segment_size_bytes"`
147148
FlushBlocksOnShutdown bool `yaml:"flush_blocks_on_shutdown"`
@@ -195,7 +196,6 @@ func (cfg *TSDBConfig) RegisterFlags(f *flag.FlagSet) {
195196
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.")
196197
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.")
197198
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.")
198-
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.")
199199
f.StringVar(&cfg.WALCompressionType, "blocks-storage.tsdb.wal-compression-type", "", "TSDB WAL type. Supported values are: 'snappy', 'zstd' and '' (disable compression)")
200200
f.IntVar(&cfg.WALSegmentSizeBytes, "blocks-storage.tsdb.wal-segment-size-bytes", wlog.DefaultSegmentSize, "TSDB WAL segments files max size (bytes).")
201201
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.")
@@ -206,6 +206,8 @@ func (cfg *TSDBConfig) RegisterFlags(f *flag.FlagSet) {
206206
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.")
207207
f.BoolVar(&cfg.EnableNativeHistograms, "blocks-storage.tsdb.enable-native-histograms", false, "[EXPERIMENTAL] True to enable native histogram.")
208208

209+
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)
210+
209211
cfg.PostingsCache.RegisterFlagsWithPrefix("blocks-storage.", f)
210212
}
211213

0 commit comments

Comments
 (0)