Skip to content

Commit

Permalink
Added bucket index flag, and enable bucket index by default. (grafana…
Browse files Browse the repository at this point in the history
  • Loading branch information
pstibrany authored Jan 20, 2021
1 parent 4e019ad commit 18a162a
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions operations/mimir/tsdb.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@

// Allow to fine tune compactor.
cortex_compactor_max_concurrency: 1,
// While this is the default value, we want to pass the same to the -blocks-storage.bucket-store.sync-interval
cortex_compactor_cleanup_interval: '15m',

// Enable use of bucket index by querier, ruler and store-gateway.
// Bucket index is generated by compactor from Cortex 1.7, there is no flag required to enable this on compactor.
cortex_bucket_index_enabled: false,
},

blocks_chunks_caching_config::
Expand Down Expand Up @@ -59,8 +65,15 @@
'blocks-storage.bucket-store.metadata-cache.memcached.max-get-multi-batch-size': '100',
} else {},

querier_args+:: $.blocks_metadata_caching_config,
ruler_args+:: $.blocks_metadata_caching_config,
bucket_index_config:: if $._config.cortex_bucket_index_enabled then {
'blocks-storage.bucket-store.bucket-index.enabled': true,

// Bucket index is updated by compactor on each cleanup cycle.
'blocks-storage.bucket-store.sync-interval': $._config.cortex_compactor_cleanup_interval,
} else {},

querier_args+:: $.blocks_metadata_caching_config + $.bucket_index_config,
ruler_args+:: $.blocks_metadata_caching_config + $.bucket_index_config,

// The ingesters should persist TSDB blocks and WAL on a persistent
// volume in order to be crash resilient.
Expand Down Expand Up @@ -134,6 +147,7 @@
'compactor.data-dir': '/data',
'compactor.compaction-interval': '30m',
'compactor.compaction-concurrency': $._config.cortex_compactor_max_concurrency,
'compactor.cleanup-interval': $._config.cortex_compactor_cleanup_interval,

// Enable sharding.
'compactor.sharding-enabled': true,
Expand Down Expand Up @@ -189,7 +203,10 @@
// Persist ring tokens so that when the store-gateway will be restarted
// it will pick the same tokens
'store-gateway.sharding-ring.tokens-file-path': '/data/tokens',
} + $.blocks_chunks_caching_config + $.blocks_metadata_caching_config,
} +
$.blocks_chunks_caching_config +
$.blocks_metadata_caching_config +
$.bucket_index_config,

store_gateway_ports:: $.util.defaultPorts,

Expand Down

0 comments on commit 18a162a

Please sign in to comment.