Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit ea33cb1

Browse files
authored
Merge pull request #257 from grafana/cleanup-blocks-storage
Cleanup blocks storage config
2 parents 5512bdd + 7ffa63b commit ea33cb1

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CHANGELOG.md

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

55
* [CHANGE] Only single cluster and namespace can now be selected in "resources" dashboards. #251
66
* [CHANGE] Increased `CortexAllocatingTooMuchMemory` warning alert threshold from 50% to 65%. #256
7+
* [CHANGE] Cleaned up blocks storage config. Moved CLI flags used only be the read path from `genericBlocksStorageConfig` to `queryBlocksStorageConfig`, and flags used only by the ingester from `genericBlocksStorageConfig` to `ingester_args`. #257
78
* [ENHANCEMENT] Added `unregister_ingesters_on_shutdown` config option to disable unregistering ingesters on shutdown (default is enabled). #213
89
* [ENHANCEMENT] Improved blocks storage observability: #237
910
- Cortex / Queries: added bucket index load operations and latency (available only when bucket index is enabled)

cortex/config.libsonnet

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,10 @@
159159

160160
genericBlocksStorageConfig:: {
161161
'store.engine': $._config.storage_engine, // May still be chunks
162-
'blocks-storage.tsdb.dir': '/data/tsdb',
162+
},
163+
queryBlocksStorageConfig:: {
163164
'blocks-storage.bucket-store.sync-dir': '/data/tsdb',
164165
'blocks-storage.bucket-store.ignore-deletion-marks-delay': '1h',
165-
'blocks-storage.tsdb.block-ranges-period': '2h',
166-
'blocks-storage.tsdb.retention-period': '96h', // 4 days protection against blocks not being uploaded from ingesters.
167-
'blocks-storage.tsdb.ship-interval': '1m',
168166

169167
'store-gateway.sharding-enabled': true,
170168
'store-gateway.sharding-ring.store': 'consul',

cortex/tsdb.libsonnet

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
'blocks-storage.bucket-store.sync-interval': $._config.cortex_compactor_cleanup_interval,
7373
} else {},
7474

75-
querier_args+:: $.blocks_metadata_caching_config + $.bucket_index_config,
76-
ruler_args+:: $.blocks_metadata_caching_config + $.bucket_index_config,
75+
querier_args+:: $._config.queryBlocksStorageConfig + $.blocks_metadata_caching_config + $.bucket_index_config,
76+
ruler_args+:: $._config.queryBlocksStorageConfig + $.blocks_metadata_caching_config + $.bucket_index_config,
7777

7878
// The ingesters should persist TSDB blocks and WAL on a persistent
7979
// volume in order to be crash resilient.
@@ -87,6 +87,11 @@
8787
ingester_deployment: {},
8888

8989
ingester_args+:: {
90+
'blocks-storage.tsdb.dir': '/data/tsdb',
91+
'blocks-storage.tsdb.block-ranges-period': '2h',
92+
'blocks-storage.tsdb.retention-period': '96h', // 4 days protection against blocks not being uploaded from ingesters.
93+
'blocks-storage.tsdb.ship-interval': '1m',
94+
9095
// Disable TSDB blocks transfer because of persistent volumes
9196
'ingester.max-transfer-retries': 0,
9297
'ingester.join-after': '0s',
@@ -196,6 +201,7 @@
196201
$._config.grpcConfig +
197202
$._config.storageConfig +
198203
$._config.blocksStorageConfig +
204+
$._config.queryBlocksStorageConfig +
199205
{
200206
target: 'store-gateway',
201207
'limits.per-user-override-config': '/etc/cortex/overrides.yaml',

0 commit comments

Comments
 (0)